diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index 3bbdf4633b..563f837c3b 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -224,11 +224,7 @@ class ProjectState: return cls(app_models) def __eq__(self, other): - if set(self.models) != set(other.models): - 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()) + return self.models == other.models and set(self.real_apps) == set(other.real_apps) class AppConfigStub(AppConfig):