mirror of
https://github.com/django/django.git
synced 2025-11-13 17:09:28 +00:00
Fixed #24537 -- Ignored field order in RenameModel detection
Thanks to David Sanders for the report and test and Simon Charette for the review.
This commit is contained in:
parent
ba1665ed75
commit
c7ec3c07e7
2 changed files with 32 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class MigrationAutodetector(object):
|
|||
change during renames)
|
||||
"""
|
||||
fields_def = []
|
||||
for name, field in fields:
|
||||
for name, field in sorted(fields):
|
||||
deconstruction = self.deep_deconstruct(field)
|
||||
if field.remote_field and field.remote_field.model:
|
||||
del deconstruction[2]['to']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue