modify get_value method for get multi-value

Because dictionary is queryDict,
If you send multiple values with the same field_name,
When using the '__get__' method, only the last element is reflected.

Use the 'getlist' method to return a list with multiple values
This commit is contained in:
sol HYUN 2016-12-05 18:51:03 +09:00
parent 5e7497bfe0
commit d4cc5478dd

View File

@ -422,7 +422,7 @@ class Field(object):
if getattr(self.root, 'partial', False):
return empty
return self.default_empty_html
ret = dictionary[self.field_name]
ret = dictionary.getlist(self.field_name)
if ret == '' and self.allow_null:
# If the field is blank, and null is a valid value then
# determine if we should use null instead.