Skip to content

Commit

Permalink
Merge pull request #2399 from askholme/master
Browse files Browse the repository at this point in the history
Fix for FileUploadParser with 3.x
  • Loading branch information
tomchristie committed Jan 12, 2015
2 parents 69fea56 + d6bff10 commit fb0a434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def parse(self, stream, media_type=None, parser_context=None):
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")

Expand Down

0 comments on commit fb0a434

Please sign in to comment.