From e06afd5f890ab59f6a8ea59a78f05e2da55cde8d Mon Sep 17 00:00:00 2001 From: Tomas Neme Date: Thu, 8 Jan 2015 16:37:49 +0700 Subject: [PATCH] don't mess with the super class return value --- ajax_upload/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax_upload/widgets.py b/ajax_upload/widgets.py index 200b978..f1286ed 100644 --- a/ajax_upload/widgets.py +++ b/ajax_upload/widgets.py @@ -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):]