mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #27563 -- Fixed ModelChoiceField.__deepcopy__() so forms don't share a queryset cache.
Thanks Luke Benstead for the report Simon Charettes for the fix.
This commit is contained in:
@@ -1155,7 +1155,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):
|
||||
|
||||
Reference in New Issue
Block a user