From b4bdd5262b18644456d12a00d475adf9897a9255 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 31 Dec 2014 17:26:15 -0500 Subject: [PATCH] Fixed #23366 -- Fixed a crash with the migrate --list command. --- django/core/management/commands/showmigrations.py | 2 +- docs/releases/1.7.2.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/django/core/management/commands/showmigrations.py b/django/core/management/commands/showmigrations.py index 9ed9e1d052..b6ef6a2ece 100644 --- a/django/core/management/commands/showmigrations.py +++ b/django/core/management/commands/showmigrations.py @@ -41,7 +41,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`).