Browse files

[1.1.X] Fixed a few more spots related to #11859. Backport of r12537 …

…from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
jkocherhans committed Feb 23, 2010
1 parent a599e50 commit ae01b0c5cb86ba68a0eeaac87b31206d9a4023bf
Showing with 2 additions and 2 deletions.
  1. +1 −1 django/db/models/fields/
  2. +1 −1 django/forms/
@@ -304,7 +304,7 @@ def _get_flatchoices(self):
"""Flattened version of choices tuple."""
flat = []
for choice, value in self.choices:
if type(value) in (list, tuple):
if isinstance(value, (list, tuple)):
@@ -660,7 +660,7 @@ def clean(self, value):
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):

0 comments on commit ae01b0c

Please sign in to comment.