1
0
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:
Markus Holtermann
2015-03-28 18:57:51 +01:00
parent ba1665ed75
commit c7ec3c07e7
2 changed files with 32 additions and 1 deletions

View File

@@ -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']