From a1fa7218ebc4a77a3912c42221927b1846f555fd Mon Sep 17 00:00:00 2001 From: Alexander Dutton Date: Fri, 23 Jan 2015 16:48:23 +0000 Subject: [PATCH] Pass {} as data to DataAndFiles, as it ends up in a MergeDict In the same vein as #2399. --- rest_framework/parsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py index ef72677ce..1efab85ba 100644 --- a/rest_framework/parsers.py +++ b/rest_framework/parsers.py @@ -250,7 +250,7 @@ class FileUploadParser(BaseParser): 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]