From 12c72796c3a385f21bc97389bef91dcd4148c0f9 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 20 May 2014 16:53:21 +0100 Subject: [PATCH] Revert "Fixed #22645: Allow apps with no models module to still have migrations" This reverts commit a4737bf6ae36a5f1cb29f2232f6deeff084fabff. --- django/db/migrations/loader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index 30a1485244..661f74ff97 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -1,4 +1,3 @@ - from __future__ import unicode_literals from importlib import import_module @@ -63,6 +62,8 @@ class MigrationLoader(object): self.unmigrated_apps = set() self.migrated_apps = set() for app_config in apps.get_app_configs(): + if app_config.models_module is None: + continue # Get the migrations module directory module_name = self.migrations_module(app_config.label) was_loaded = module_name in sys.modules