Fixed #3235 - A querydict which yields a list with only one value now correctly returns the provided data.

This commit is contained in:
Keryn Knight 2015-08-07 11:43:17 +01:00
parent 08d60f5cc2
commit 0078f66104

View File

@ -1384,7 +1384,7 @@ class ListField(Field):
# lists in HTML forms.
if html.is_html_input(dictionary):
val = dictionary.getlist(self.field_name, [])
if len(val) > 1:
if len(val) > 0:
# Support QueryDict lists in HTML input.
return val
return html.parse_html_list(dictionary, prefix=self.field_name)