summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/core/management/commands/migrate.py2
-rw-r--r--docs/releases/1.7.2.txt3
2 files changed, 4 insertions, 1 deletions
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py
index 24cb33ca47..ce65ac7cff 100644
--- a/django/core/management/commands/migrate.py
+++ b/django/core/management/commands/migrate.py
@@ -305,7 +305,7 @@ class Command(BaseCommand):
some named apps.
"""
# Load migrations from disk/DB
- loader = MigrationLoader(connection)
+ loader = MigrationLoader(connection, ignore_no_migrations=True)
graph = loader.graph
# If we were passed a list of apps, validate it
if app_names:
diff --git a/docs/releases/1.7.2.txt b/docs/releases/1.7.2.txt
index 1070946d83..3b614ed7ab 100644
--- a/docs/releases/1.7.2.txt
+++ b/docs/releases/1.7.2.txt
@@ -189,3 +189,6 @@ Bugfixes
* Fixed crash when ``ValidationError`` is initialized with a ``ValidationError``
that is initialized with a dictionary (:ticket:`24008`).
+
+* Prevented a crash on apps without migrations when running ``migrate --list``
+ (:ticket:`23366`).