diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-01-21 22:34:36 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-01-21 22:34:36 +0100 |
| commit | 013db6ba85fb880bd1f9a5ad2e91dc5c1efe197c (patch) | |
| tree | 2a65d7dc3b81d8856a15d936b7a1b3ff23b30e8f /django | |
| parent | c6e0dedbdb22f4db6577886a2b67e5423684fe7f (diff) | |
Fixed #18051 -- Allowed admin fieldsets to contain lists
Thanks Ricardo di Virgilio for the report, Mateus Gondim for the
patch and Nick Sandford for the review.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/util.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/contrib/admin/util.py b/django/contrib/admin/util.py index a85045c515..07013d1d4b 100644 --- a/django/contrib/admin/util.py +++ b/django/contrib/admin/util.py @@ -88,8 +88,7 @@ def flatten_fieldsets(fieldsets): field_names = [] for name, opts in fieldsets: for field in opts['fields']: - # type checking feels dirty, but it seems like the best way here - if type(field) == tuple: + if isinstance(field, (list, tuple)): field_names.extend(field) else: field_names.append(field) |
