mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 13:30:12 +03:00
'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:
parent
f7b2829b03
commit
8d441e31d1
|
@ -422,10 +422,7 @@ class Field(object):
|
||||||
if getattr(self.root, 'partial', False):
|
if getattr(self.root, 'partial', False):
|
||||||
return empty
|
return empty
|
||||||
return self.default_empty_html
|
return self.default_empty_html
|
||||||
if len(dictionary.getlist(self.field_name)) > 1:
|
ret = dictionary[self.field_name]
|
||||||
ret = dictionary.getlist(self.field_name)
|
|
||||||
else:
|
|
||||||
ret = dictionary.get(self.field_name)
|
|
||||||
if ret == '' and self.allow_null:
|
if ret == '' and self.allow_null:
|
||||||
# If the field is blank, and null is a valid value then
|
# If the field is blank, and null is a valid value then
|
||||||
# determine if we should use null instead.
|
# determine if we should use null instead.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user