Browse files

Fix soft-apply detection of migrations with dependencies

  • Loading branch information...
1 parent 78a2617 commit 4b3b25104d6795867a7fbe0c2f6f855ca96358e5 @andrewgodwin andrewgodwin committed Jan 24, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/db/migrations/executor.py
View
4 django/db/migrations/executor.py
@@ -85,7 +85,7 @@ def apply_migration(self, migration, fake=False):
self.progress_callback("apply_start", migration, fake)
if not fake:
# Test to see if this is an already-applied initial migration
- if not migration.dependencies and self.detect_soft_applied(migration):
+ if self.detect_soft_applied(migration):
fake = True
else:
# Alright, do it normally
@@ -135,4 +135,6 @@ def detect_soft_applied(self, migration):
model = apps.get_model(migration.app_label, operation.name)
if model._meta.db_table not in self.connection.introspection.get_table_list(self.connection.cursor()):
return False
+ else:
+ return False
return True

0 comments on commit 4b3b251

Please sign in to comment.