Kaydet (Commit) 1e5c01c2 authored tarafından Andrew Godwin's avatar Andrew Godwin

Improve error message for missing migrations in an app

üst c755c8da
...@@ -150,8 +150,11 @@ class MigrationLoader(object): ...@@ -150,8 +150,11 @@ class MigrationLoader(object):
# so we're fine. # so we're fine.
return return
if key[0] in self.migrated_apps: if key[0] in self.migrated_apps:
return list(self.graph.root_nodes(key[0]))[0] try:
raise ValueError("Dependency on unknown app %s" % key[0]) return list(self.graph.root_nodes(key[0]))[0]
except IndexError:
raise ValueError("Dependency on app with no migrations: %s" % key[0])
raise ValueError("Dependency on unknown app: %s" % key[0])
def build_graph(self): def build_graph(self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment