mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
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
This commit is contained in:
parent
605c1fa0a8
commit
d6bff10f98
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user