Django

Code

Changeset 7644

Show
Ignore:
Timestamp:
06/15/08 22:22:44 (7 months ago)
Author:
adrian
Message:

Fixed #7171 -- Removed some redundant code in ModelChoiceField?. Thanks for the patch, sebastian_noack

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/newforms/models.py

    r7326 r7644  
    347347        return ModelChoiceIterator(self) 
    348348 
    349     def _set_choices(self, value): 
    350         # This method is copied from ChoiceField._set_choices(). It's necessary 
    351         # because property() doesn't allow a subclass to overwrite only 
    352         # _get_choices without implementing _set_choices. 
    353         self._choices = self.widget.choices = list(value) 
    354  
    355     choices = property(_get_choices, _set_choices) 
     349    choices = property(_get_choices, ChoiceField._set_choices) 
    356350 
    357351    def clean(self, value):