Commits

and...@69d324d9-c39d-4fdc-8679-7745eae9e2c8  committed b15eb43

Fix for #56: No longer bork when an app has no migrations.

  • Participants
  • Parent commits 9e4324c

Comments (0)

Files changed (1)

File migration.py

     tree = dependency_tree()
     migrations = get_migration_names(app)
     
+    # If there aren't any, quit quizically
+    if not migrations:
+        if not silent:
+            print "? You have no migrations for the '%s' app. You might want some." % app_name
+        return
+    
     if target_name not in migrations and target_name not in ["zero", None]:
         matches = [x for x in migrations if x.startswith(target_name)]
         if len(matches) == 1: