summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-05-29 15:34:35 -0700
committerAndrew Godwin <andrew@aeracode.org>2014-05-29 15:34:35 -0700
commit67d9f70e4c804355422a6f8810dfa42ede8a3bae (patch)
tree27e683fd106b4f68d61794f8ff82989d4803435e
parent3149cdce32e7261b2d44128ab712c4d4f1a5d429 (diff)
Fix test failure caused by 3149cdce32e7261b2d44128ab712c4d4f1a5d429
-rw-r--r--django/core/management/sql.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/management/sql.py b/django/core/management/sql.py
index 02bc2603ce..721afb2d04 100644
--- a/django/core/management/sql.py
+++ b/django/core/management/sql.py
@@ -9,11 +9,12 @@ from django.apps import apps
from django.conf import settings
from django.core.management.base import CommandError
from django.db import models, router
-from django.db.migrations.loader import MigrationLoader
from django.utils.deprecation import RemovedInDjango19Warning
def check_for_migrations(app_config, connection):
+ # Inner import to stop tests failing
+ from django.db.migrations.loader import MigrationLoader
loader = MigrationLoader(connection)
if app_config.label in loader.migrated_apps:
raise CommandError("App '%s' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations." % app_config.label)