Ticket #5913: model_choice_field.patch
File model_choice_field.patch, 595 bytes (added by , 17 years ago) |
---|
-
newforms/models.py
176 176 return None 177 177 try: 178 178 value = self.queryset.model._default_manager.get(pk=value) 179 if not value in self.queryset: 180 raise self.queryset.model.DoesNotExist 179 181 except self.queryset.model.DoesNotExist: 180 182 raise ValidationError(ugettext(u'Select a valid choice. That choice is not one of the available choices.')) 181 183 return value