Skip to content

Commit

Permalink
Check if data is not empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
pingiun committed Dec 7, 2022
1 parent 36c3595 commit bc25807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "django-filepond-widget"
version = "0.7.0"
version = "0.8.0"
description = ""
readme = "README.md"
authors = [{ name = "Jelle Besseling", email = "[email protected]" }]
Expand Down
2 changes: 1 addition & 1 deletion src/django_filepond_widget/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
self.widget.filepond_options = filepond_options or {}

def to_python(self, data):
if isinstance(data, str):
if isinstance(data, str) and data != "":
temp_upload = TemporaryUpload.objects.get(upload_id=data)
return FilePondFile(temp_upload)
return super().to_python(data)

0 comments on commit bc25807

Please sign in to comment.