Ticket #3406: unicode-choices-checking.patch
File unicode-choices-checking.patch, 618 bytes (added by , 18 years ago) |
---|
-
django/newforms/fields.py
354 354 value = smart_unicode(value) 355 355 if value == u'': 356 356 return value 357 valid_values = set([s tr(k) for k, v in self.choices])357 valid_values = set([smart_unicode(k) for k, v in self.choices]) 358 358 if value not in valid_values: 359 359 raise ValidationError(gettext(u'Select a valid choice. %s is not one of the available choices.') % value) 360 360 return value