summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-07-30 10:13:10 -0400
committerTim Graham <timograham@gmail.com>2016-07-30 13:31:48 -0400
commit4e861682904744b0ea3ead8552513c6f1a826c5a (patch)
treec1714ce7f35a1f1829f9e9e7dc8f6e5afc1e0587 /django/forms
parent36fbf9b7d1870121269a09540d689ffc16a56d74 (diff)
Fixed #26970 -- Fixed crash with disabled ModelMultipleChoiceField.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index ff34ebfe78..7cb2159b1d 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1251,6 +1251,7 @@ class ModelMultipleChoiceField(ModelChoiceField):
return list(self._check_values(value))
def clean(self, value):
+ value = self.prepare_value(value)
if self.required and not value:
raise ValidationError(self.error_messages['required'], code='required')
elif not self.required and not value: