mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Simplified migrations.state.ProjectState.__eq__().
This commit is contained in:
@@ -224,11 +224,7 @@ class ProjectState:
|
|||||||
return cls(app_models)
|
return cls(app_models)
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
if set(self.models) != set(other.models):
|
return self.models == other.models and set(self.real_apps) == set(other.real_apps)
|
||||||
return False
|
|
||||||
if set(self.real_apps) != set(other.real_apps):
|
|
||||||
return False
|
|
||||||
return all(model == other.models[key] for key, model in self.models.items())
|
|
||||||
|
|
||||||
|
|
||||||
class AppConfigStub(AppConfig):
|
class AppConfigStub(AppConfig):
|
||||||
|
|||||||
Reference in New Issue
Block a user