Commit 1e5c01c2 authored by Andrew Godwin's avatar Andrew Godwin
Browse files

Improve error message for missing migrations in an app

parent c755c8da
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -150,8 +150,11 @@ class MigrationLoader(object):
            # so we're fine.
            return
        if key[0] in self.migrated_apps:
            try:
                return list(self.graph.root_nodes(key[0]))[0]
        raise ValueError("Dependency on unknown app %s" % key[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):
        """