1. Luke Plant
  2. south


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

Allow migrations with no models to work properly.

  • Participants
  • Parent commits e8c81bb
  • Branches default

Comments (0)

Files changed (1)

File management/commands/startmigration.py

View file
     help = "Creates a new template migration for the given app"
-    def handle(self, app=None, name="", model_list=[], initial=False, **options):
+    def handle(self, app=None, name="", model_list=None, initial=False, **options):
+        # If model_list is None, then it's an empty list
+        model_list = model_list or []
         # make sure --model and --all aren't both specified
         if initial and model_list:
             print "You cannot use --initial and other options together"