Simplified migrations.state.ProjectState.__eq__().

This commit is contained in:
Sergey Fedoseev 2017-08-25 13:50:01 +05:00
parent 1a85b07bdd
commit 61da949ff6
1 changed files with 1 additions and 5 deletions

View File

@ -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):