We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6510822 commit a599e50Copy full SHA for a599e50
django/core/management/validation.py
@@ -62,7 +62,7 @@ def get_validation_errors(outfile, app=None):
62
e.add(opts, '"%s": "choices" should be iterable (e.g., a tuple or list).' % f.name)
63
else:
64
for c in f.choices:
65
- if not type(c) in (tuple, list) or len(c) != 2:
+ if not isinstance(c, (list, tuple)) or len(c) != 2:
66
e.add(opts, '"%s": "choices" should be a sequence of two-tuples.' % f.name)
67
if f.db_index not in (None, True, False):
68
e.add(opts, '"%s": "db_index" should be either None, True or False.' % f.name)
0 commit comments