Skip to content

Commit 0078f66

Browse files
committed
Fixed #3235 - A querydict which yields a list with only one value now correctly returns the provided data.
1 parent 08d60f5 commit 0078f66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ def get_value(self, dictionary):
13841384
# lists in HTML forms.
13851385
if html.is_html_input(dictionary):
13861386
val = dictionary.getlist(self.field_name, [])
1387-
if len(val) > 1:
1387+
if len(val) > 0:
13881388
# Support QueryDict lists in HTML input.
13891389
return val
13901390
return html.parse_html_list(dictionary, prefix=self.field_name)

0 commit comments

Comments
 (0)