aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/parsers.py
diff options
context:
space:
mode:
authorAsk Holme2015-01-10 18:15:21 +0100
committerAsk Holme2015-01-10 18:15:21 +0100
commitd6bff10f9829b3cef1c2773c303b172a8c7ec525 (patch)
treee0141ae05f9f57b2f338a70988d3d7517f01f5ce /rest_framework/parsers.py
parent605c1fa0a8d9b4ebcfdfa2273628739fc38f6d1e (diff)
downloaddjango-rest-framework-d6bff10f9829b3cef1c2773c303b172a8c7ec525.tar.bz2
Make FileUploadParser work with standard django API
Output from parsers ends up in a Django MergeDict and they exists elements to be dicts - not None
Diffstat (limited to 'rest_framework/parsers.py')
-rw-r--r--rest_framework/parsers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py
index 3e3395c0..401856ec 100644
--- a/rest_framework/parsers.py
+++ b/rest_framework/parsers.py
@@ -277,7 +277,7 @@ class FileUploadParser(BaseParser):
for index, handler in enumerate(upload_handlers):
file_obj = handler.file_complete(counters[index])
if file_obj:
- return DataAndFiles(None, {'file': file_obj})
+ return DataAndFiles({}, {'file': file_obj})
raise ParseError("FileUpload parse error - "
"none of upload handlers can handle the stream")