Fixed handle empty filename

This commit is contained in:
Vladislav Vlastovskiy 2014-04-14 15:52:03 +04:00
parent b3b0515ae6
commit 0fb927d2f5

View File

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