Skip to content

Commit

Permalink
Merge pull request encode#2453 from alexsdutton/data-and-files-none-data
Browse files Browse the repository at this point in the history
Pass {} as data to DataAndFiles, as it ends up in a MergeDict
  • Loading branch information
tomchristie committed Jan 23, 2015
2 parents 8f6d7f4 + a1fa721 commit 0cb5ace
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 @@ -250,7 +250,7 @@ def parse(self, stream, media_type=None, parser_context=None):
None,
encoding)
if result is not None:
return DataAndFiles(None, {'file': result[1]})
return DataAndFiles({}, {'file': result[1]})

# This is the standard case.
possible_sizes = [x.chunk_size for x in upload_handlers if x.chunk_size]
Expand Down

0 comments on commit 0cb5ace

Please sign in to comment.