mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed small Unicode error in newforms. Thanks, Honza Král. Refs #3114
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -277,7 +277,7 @@ class MultipleChoiceField(ChoiceField):
|
||||
val = smart_unicode(val)
|
||||
new_value.append(val)
|
||||
# Validate that each value in the value list is in self.choices.
|
||||
valid_values = set([k for k, v in self.choices])
|
||||
valid_values = set([smart_unicode(k) for k, v in self.choices])
|
||||
for val in new_value:
|
||||
if val not in valid_values:
|
||||
raise ValidationError(gettext(u'Select a valid choice. %s is not one of the available choices.') % val)
|
||||
|
||||
Reference in New Issue
Block a user