From 61da949ff66b1e93e16ee112a5de2cf4a60ae5f3 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Fri, 25 Aug 2017 13:50:01 +0500 Subject: [PATCH] Simplified migrations.state.ProjectState.__eq__(). --- django/db/migrations/state.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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):