diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2013-11-20 10:28:22 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2013-11-20 17:26:26 +0100 |
| commit | 331d79a77d48e1a46df0290689d4d865e67221c4 (patch) | |
| tree | 88ec34b72e3ec4e7722164196c8497dcc26309b5 /django | |
| parent | 4cfe6ba6a3d16a16f0561f2f3c5b56d117f8a60d (diff) | |
Fixed #21469 -- Allow set objects in Meta.unique_together.
Thanks to Tim for the review.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/options.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py index d4d72c81b5..5c4a9dcad7 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -32,6 +32,7 @@ def normalize_unique_together(unique_together): tuple of two strings. Normalize it to a tuple of tuples, so that calling code can uniformly expect that. """ + unique_together = tuple(unique_together) if unique_together and not isinstance(unique_together[0], (tuple, list)): unique_together = (unique_together,) return unique_together |
