Skip to content

don't mess with the super class return value #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ajax_upload/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def value_from_datadict(self, data, files, name):
elif name in data: # This means a file path was specified in the POST field
file_path = data.get(name)
if not file_path:
return False # False means clear the existing file
return file # Return whatever the super class returned
elif file_path.startswith(settings.MEDIA_URL):
# Strip and media url to determine the path relative to media url base
relative_path = file_path[len(settings.MEDIA_URL):]
Expand Down