From 4b9e9aaa32dd7431d582fc64f113145d53fac68c Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 1 Jul 2015 19:08:18 -0300 Subject: [PATCH] Remove unnecessary code --- legacy/scripts/migration_base.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/legacy/scripts/migration_base.py b/legacy/scripts/migration_base.py index 9d49045f6..716d1bc23 100644 --- a/legacy/scripts/migration_base.py +++ b/legacy/scripts/migration_base.py @@ -23,10 +23,3 @@ legacy_app = apps.get_app_config('legacy') legacy_model_names = set(m.__name__ for m in legacy_app.get_models()) model_dict = {m.__name__: m for ac in appconfs for m in ac.get_models()} -assert legacy_model_names == set(model_dict.keys()) - - -def has_primary_key(model): - return any(field.primary_key for field in model._meta.fields) - -assert all(has_primary_key(model) for model in legacy_app.models.values())