summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMarkus Holtermann <info@markusholtermann.eu>2015-03-28 18:57:51 +0100
committerMarkus Holtermann <info@markusholtermann.eu>2015-03-28 20:45:15 +0100
commitc7ec3c07e78e288a48e87b979dbd12e1fa44fe66 (patch)
tree7f149cd0c4bcbd0e5ed37ce891f0c495e5bb72f9 /django
parentba1665ed75264e57b7bc6cd7606e072ad3050a3b (diff)
Fixed #24537 -- Ignored field order in RenameModel detection
Thanks to David Sanders for the report and test and Simon Charette for the review.
Diffstat (limited to 'django')
-rw-r--r--django/db/migrations/autodetector.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py
index 786de794df..a73985d724 100644
--- a/django/db/migrations/autodetector.py
+++ b/django/db/migrations/autodetector.py
@@ -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']