MCPcopy
hub / github.com/django/django / find_migration

Method find_migration

django/core/management/commands/squashmigrations.py:241–253  ·  view source on GitHub ↗
(self, loader, app_label, name)

Source from the content-addressed store, hash-verified

239 )
240
241 def find_migration(self, loader, app_label, name):
242 try:
243 return loader.get_migration_by_prefix(app_label, name)
244 except AmbiguityError:
245 raise CommandError(
246 "More than one migration matches '%s' in app '%s'. Please be "
247 "more specific." % (name, app_label)
248 )
249 except KeyError:
250 raise CommandError(
251 "Cannot find a migration matching '%s' from app '%s'."
252 % (name, app_label)
253 )

Callers 1

handleMethod · 0.95

Calls 2

CommandErrorClass · 0.90

Tested by

no test coverage detected