mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Fixed ListField validation for POST request with content-type form-data.
This commit is contained in:
parent
871ce34983
commit
939af5f4e3
|
@ -1551,7 +1551,8 @@ class ListField(Field):
|
|||
if len(val) > 0:
|
||||
# Support QueryDict lists in HTML input.
|
||||
return val
|
||||
return html.parse_html_list(dictionary, prefix=self.field_name)
|
||||
parsed_list = html.parse_html_list(dictionary, prefix=self.field_name)
|
||||
return parsed_list if parsed_list else empty
|
||||
return dictionary.get(self.field_name, empty)
|
||||
|
||||
def to_internal_value(self, data):
|
||||
|
|
Loading…
Reference in New Issue
Block a user