Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix soft-apply detection of migrations with dependencies

  • Loading branch information...
commit 4b3b25104d6795867a7fbe0c2f6f855ca96358e5 1 parent 78a2617
@andrewgodwin andrewgodwin authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.