Skip to content

Commit 0cb5ace

Browse files
committed
Merge pull request #2453 from alexsdutton/data-and-files-none-data
Pass {} as data to DataAndFiles, as it ends up in a MergeDict
2 parents 8f6d7f4 + a1fa721 commit 0cb5ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def parse(self, stream, media_type=None, parser_context=None):
250250
None,
251251
encoding)
252252
if result is not None:
253-
return DataAndFiles(None, {'file': result[1]})
253+
return DataAndFiles({}, {'file': result[1]})
254254

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

0 commit comments

Comments
 (0)