From 0078f661048fba5f71a44ee2d10334197f1181b7 Mon Sep 17 00:00:00 2001 From: Keryn Knight Date: Fri, 7 Aug 2015 11:43:17 +0100 Subject: [PATCH] Fixed #3235 - A querydict which yields a list with only one value now correctly returns the provided data. --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 1d12b1d92..772f39e3d 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -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)