mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Fixed #3235 - A querydict which yields a list with only one value now correctly returns the provided data.
This commit is contained in:
parent
08d60f5cc2
commit
0078f66104
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user