[1.7.x] Swapped placeholders in [sql]migrate command error
Backport of b67e9ed8c9
from master.
This commit is contained in:
parent
44b00af9bc
commit
9005894233
|
@ -87,9 +87,11 @@ class Command(BaseCommand):
|
||||||
try:
|
try:
|
||||||
migration = executor.loader.get_migration_by_prefix(app_label, migration_name)
|
migration = executor.loader.get_migration_by_prefix(app_label, migration_name)
|
||||||
except AmbiguityError:
|
except AmbiguityError:
|
||||||
raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % (app_label, migration_name))
|
raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % (
|
||||||
|
migration_name, app_label))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise CommandError("Cannot find a migration matching '%s' from app '%s'." % (app_label, migration_name))
|
raise CommandError("Cannot find a migration matching '%s' from app '%s'." % (
|
||||||
|
migration_name, app_label))
|
||||||
targets = [(app_label, migration.name)]
|
targets = [(app_label, migration.name)]
|
||||||
target_app_labels_only = False
|
target_app_labels_only = False
|
||||||
elif len(args) == 1:
|
elif len(args) == 1:
|
||||||
|
|
|
@ -39,9 +39,11 @@ class Command(BaseCommand):
|
||||||
try:
|
try:
|
||||||
migration = executor.loader.get_migration_by_prefix(app_label, migration_name)
|
migration = executor.loader.get_migration_by_prefix(app_label, migration_name)
|
||||||
except AmbiguityError:
|
except AmbiguityError:
|
||||||
raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % (app_label, migration_name))
|
raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % (
|
||||||
|
migration_name, app_label))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise CommandError("Cannot find a migration matching '%s' from app '%s'. Is it in INSTALLED_APPS?" % (app_label, migration_name))
|
raise CommandError("Cannot find a migration matching '%s' from app '%s'. Is it in INSTALLED_APPS?" % (
|
||||||
|
migration_name, app_label))
|
||||||
targets = [(app_label, migration.name)]
|
targets = [(app_label, migration.name)]
|
||||||
|
|
||||||
# Make a plan that represents just the requested migrations and show SQL
|
# Make a plan that represents just the requested migrations and show SQL
|
||||||
|
|
Loading…
Reference in New Issue