1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed a few more spots related to #11859. Thanks, cramm and Alex Gaynor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans
2010-02-23 18:27:51 +00:00
parent 0f1769555e
commit 7352238e16
2 changed files with 3 additions and 3 deletions

View File

@@ -621,7 +621,7 @@ class ChoiceField(Field):
def valid_value(self, value):
"Check to see if the provided value is a valid choice"
for k, v in self.choices:
if type(v) in (tuple, list):
if isinstance(v, (list, tuple)):
# This is an optgroup, so look inside the group for options
for k2, v2 in v:
if value == smart_unicode(k2):