summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index e9b71ccf26..0913a4e8b8 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1033,6 +1033,8 @@ class ModelMultipleChoiceField(ModelChoiceField):
return qs
def prepare_value(self, value):
- if hasattr(value, '__iter__') and not isinstance(value, six.text_type):
+ if (hasattr(value, '__iter__') and
+ not isinstance(value, six.text_type) and
+ not hasattr(value, '_meta')):
return [super(ModelMultipleChoiceField, self).prepare_value(v) for v in value]
return super(ModelMultipleChoiceField, self).prepare_value(value)