mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #31499 -- Ignored field ordering to determine ModelState equality.
This commit is contained in:
committed by
Mariusz Felisiak
parent
0f2885e3f6
commit
696024fb73
@@ -603,7 +603,7 @@ class ModelState:
|
||||
(self.name == other.name) and
|
||||
(len(self.fields) == len(other.fields)) and
|
||||
all((k1 == k2 and (f1.deconstruct()[1:] == f2.deconstruct()[1:]))
|
||||
for (k1, f1), (k2, f2) in zip(self.fields, other.fields)) and
|
||||
for (k1, f1), (k2, f2) in zip(sorted(self.fields), sorted(other.fields))) and
|
||||
(self.options == other.options) and
|
||||
(self.bases == other.bases) and
|
||||
(self.managers == other.managers)
|
||||
|
||||
Reference in New Issue
Block a user