A fix to the issue ##3610

A fix to the issue #3610
This commit is contained in:
Yu You 2015-11-23 15:40:34 +02:00
parent a8deb380ff
commit 03151ca4fd

View File

@ -183,7 +183,7 @@ class FileUploadParser(BaseParser):
for index, handler in enumerate(upload_handlers): for index, handler in enumerate(upload_handlers):
file_obj = handler.file_complete(counters[index]) file_obj = handler.file_complete(counters[index])
if file_obj: if file_obj is not None:
return DataAndFiles({}, {'file': file_obj}) return DataAndFiles({}, {'file': file_obj})
raise ParseError("FileUpload parse error - " raise ParseError("FileUpload parse error - "
"none of upload handlers can handle the stream") "none of upload handlers can handle the stream")