From 8d441e31d1214cb365d7c96f621ee978dd648051 Mon Sep 17 00:00:00 2001 From: sol HYUN Date: Tue, 6 Dec 2016 00:56:44 +0900 Subject: [PATCH] 'get_value method' is reverted If I manipulate the List, I get a lot of errors. Although multi-upload operations are limited, It works fine when doing a single upload from a nested serializer. --- rest_framework/fields.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 96dfc5831..13b5145ba 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -422,10 +422,7 @@ class Field(object): if getattr(self.root, 'partial', False): return empty return self.default_empty_html - if len(dictionary.getlist(self.field_name)) > 1: - ret = dictionary.getlist(self.field_name) - else: - ret = dictionary.get(self.field_name) + ret = dictionary[self.field_name] if ret == '' and self.allow_null: # If the field is blank, and null is a valid value then # determine if we should use null instead.