Opened 11 years ago
Closed 11 years ago
#21469 closed Bug (fixed)
makemigrations and normalize_unique_together
Reported by: | Owned by: | ||
---|---|---|---|
Component: | Migrations | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Baptiste Mispelon | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
normalize_unique_together breaks when it is given a set()
, but that's what Django migration's autodetector provides when running makemigrations
.
To reproduce:
- Create a model with unique_together
- Run makemigrations
Seems to have been introduced on Oct 7 in the fix for #21236 (4dbd95a)
Change History (4)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:3 by , 11 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 11 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
What about simply forcing
unique_together
to be a tuple at the beginning ofnormalize_unique_together()
?PR (with tests) here: https://github.com/django/django/pull/1946