Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #11859. Allowed subclasses of tuple or list for choice options.…

… Thanks, Alex Gaynor.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent f2d5582 commit 0f1769555e1d43ff83f3a715095ac28f24499c2a @jkocherhans jkocherhans committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/management/
2  django/core/management/
@@ -62,7 +62,7 @@ def get_validation_errors(outfile, app=None):
e.add(opts, '"%s": "choices" should be iterable (e.g., a tuple or list).' %
for c in f.choices:
- if not type(c) in (tuple, list) or len(c) != 2:
+ if not isinstance(c, (list, tuple)) or len(c) != 2:
e.add(opts, '"%s": "choices" should be a sequence of two-tuples.' %
if f.db_index not in (None, True, False):
e.add(opts, '"%s": "db_index" should be either None, True or False.' %

0 comments on commit 0f17695

Please sign in to comment.
Something went wrong with that request. Please try again.