mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Fix incorrect HTML parsing for DictField
This commit is contained in:
parent
fbb21caaaa
commit
c3425accde
|
@ -1192,9 +1192,9 @@ class DictField(Field):
|
|||
|
||||
def get_value(self, dictionary):
|
||||
# We override the default field access in order to support
|
||||
# lists in HTML forms.
|
||||
# dictionaries in HTML forms.
|
||||
if html.is_html_input(dictionary):
|
||||
return html.parse_html_list(dictionary, prefix=self.field_name)
|
||||
return html.parse_html_dict(dictionary, prefix=self.field_name)
|
||||
return dictionary.get(self.field_name, empty)
|
||||
|
||||
def to_internal_value(self, data):
|
||||
|
|
Loading…
Reference in New Issue
Block a user