summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-03-15 12:54:26 -0400
committerTim Graham <timograham@gmail.com>2017-03-15 12:55:05 -0400
commita95616944b9cb58c2547d1f08590b3ad3a142fe2 (patch)
tree73ca97aa982dff781d864cca558e095635e9c109 /django/forms
parent3c1ed1d336c847ed35934b3169632455505f4acb (diff)
[1.11.x] Refs #27563 -- Fixed ModelChoiceField.__deepcopy__() so forms don't share a queryset cache.
Thanks Luke Benstead for the report Simon Charettes for the fix. Backport of 44f9241c48e28823b140bc4ec7515f5a88b88c32 from master
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index a0f3ff53b3..de0ab6c28d 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1165,7 +1165,7 @@ class ModelChoiceField(ChoiceField):
def __deepcopy__(self, memo):
result = super(ChoiceField, self).__deepcopy__(memo)
# Need to force a new ModelChoiceIterator to be created, bug #11183
- result.queryset = result.queryset
+ result.queryset = self.queryset.all()
return result
def _get_queryset(self):