'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.
This commit is contained in:
sol HYUN 2016-12-06 00:56:44 +09:00
parent f7b2829b03
commit 8d441e31d1

View File

@ -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.