mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user