mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Fix for #2894 thanks to @carljm
This commit is contained in:
parent
94e2d3ca61
commit
5c90bf9cc0
|
@ -1060,7 +1060,11 @@ class MultipleChoiceField(ChoiceField):
|
|||
# We override the default field access in order to support
|
||||
# lists in HTML forms.
|
||||
if html.is_html_input(dictionary):
|
||||
return dictionary.getlist(self.field_name)
|
||||
ret = dictionary.getlist(self.field_name)
|
||||
if getattr(self.root, 'partial', False) and not ret:
|
||||
ret = empty
|
||||
return ret
|
||||
|
||||
return dictionary.get(self.field_name, empty)
|
||||
|
||||
def to_internal_value(self, data):
|
||||
|
|
Loading…
Reference in New Issue
Block a user