Ticket #9938: 9938.patch
File 9938.patch, 775 bytes (added by , 16 years ago) |
---|
-
django/forms/models.py
705 705 value = self.queryset.get(**{key: value}) 706 706 except self.queryset.model.DoesNotExist: 707 707 raise ValidationError(self.error_messages['invalid_choice']) 708 except ValueError: 709 # Raised when string is passed. 710 raise ValidationError(self.error_messages['invalid_choice']) 711 except OverflowError: 712 # Raised when ridiculously large integer is passed. 713 raise ValidationError(self.error_messages['invalid_choice']) 708 714 return value 709 715 710 716 class ModelMultipleChoiceField(ModelChoiceField):