This commit is contained in:
Spawn 2017-09-14 11:31:25 +00:00 committed by GitHub
commit e2294e8844

View File

@ -1562,7 +1562,9 @@ class ListField(Field):
# We override the default field access in order to support # We override the default field access in order to support
# lists in HTML forms. # lists in HTML forms.
if html.is_html_input(dictionary): if html.is_html_input(dictionary):
val = dictionary.getlist(self.field_name, []) val = dictionary.getlist(self.field_name, empty)
if val == empty:
return val
if len(val) > 0: if len(val) > 0:
# Support QueryDict lists in HTML input. # Support QueryDict lists in HTML input.
return val return val