Kaydet (Commit) 12c72796 authored tarafından Andrew Godwin's avatar Andrew Godwin

Revert "Fixed #22645: Allow apps with no models module to still have migrations"

This reverts commit a4737bf6.
üst 03900a02
from __future__ import unicode_literals from __future__ import unicode_literals
from importlib import import_module from importlib import import_module
...@@ -63,6 +62,8 @@ class MigrationLoader(object): ...@@ -63,6 +62,8 @@ class MigrationLoader(object):
self.unmigrated_apps = set() self.unmigrated_apps = set()
self.migrated_apps = set() self.migrated_apps = set()
for app_config in apps.get_app_configs(): for app_config in apps.get_app_configs():
if app_config.models_module is None:
continue
# Get the migrations module directory # Get the migrations module directory
module_name = self.migrations_module(app_config.label) module_name = self.migrations_module(app_config.label)
was_loaded = module_name in sys.modules was_loaded = module_name in sys.modules
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment