This commit is contained in:
Anaël Beutot 2017-10-20 07:14:46 +00:00 committed by GitHub
commit ddb0ea3656

View File

@ -580,6 +580,10 @@ class ListSerializer(BaseSerializer):
# We override the default field access in order to support
# lists in HTML forms.
if html.is_html_input(dictionary):
if self.field_name not in dictionary:
if getattr(self.root, 'partial', False):
return empty
return html.parse_html_list(dictionary, prefix=self.field_name)
return dictionary.get(self.field_name, empty)