1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Fixed #11183 - BaseForm init leaves pointers pointing back to base_fields

Thanks to margieroginski for the report



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant
2010-03-08 23:55:04 +00:00
parent 960af90279
commit 48cd8e856f
2 changed files with 20 additions and 1 deletions

View File

@@ -923,6 +923,12 @@ class ModelChoiceField(ChoiceField):
self.choice_cache = None
self.to_field_name = to_field_name
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
return result
def _get_queryset(self):
return self._queryset