Ticket #8908: fix_modelform_unique_check.diff
File fix_modelform_unique_check.diff, 748 bytes (added by , 16 years ago) |
---|
-
forms/models.py
216 216 # Make sure the unique checks apply to actual fields on the ModelForm 217 217 for name, field in self.fields.items(): 218 218 try: 219 f = self.instance._meta.get_field_by_name(name)[0] 219 field = self.instance._meta.get_field_by_name(name) 220 if not field[2]: 221 raise FieldDoesNotExist 222 else: 223 f = field[0] 220 224 except FieldDoesNotExist: 221 225 # This is an extra field that's not on the ModelForm, ignore it 222 226 continue