diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2008-06-16 03:22:44 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2008-06-16 03:22:44 +0000 |
| commit | 9e8a5969e78b6719fedd74683c3083247593519d (patch) | |
| tree | c96466ae8fa02470f1988ca38432efb4644ceb30 | |
| parent | 06315375ce5c6477b7498026177b7e715372a7d1 (diff) | |
Fixed #7171 -- Removed some redundant code in ModelChoiceField. Thanks for the patch, sebastian_noack
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/newforms/models.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/django/newforms/models.py b/django/newforms/models.py index 0590839b25..78a204125f 100644 --- a/django/newforms/models.py +++ b/django/newforms/models.py @@ -346,13 +346,7 @@ class ModelChoiceField(ChoiceField): # the queryset. return ModelChoiceIterator(self) - def _set_choices(self, value): - # This method is copied from ChoiceField._set_choices(). It's necessary - # because property() doesn't allow a subclass to overwrite only - # _get_choices without implementing _set_choices. - self._choices = self.widget.choices = list(value) - - choices = property(_get_choices, _set_choices) + choices = property(_get_choices, ChoiceField._set_choices) def clean(self, value): Field.clean(self, value) |
