diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-01-24 12:26:19 +0000 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-01-24 12:26:38 +0000 |
| commit | 4b3b25104d6795867a7fbe0c2f6f855ca96358e5 (patch) | |
| tree | 5709bb6c3272d0b110557da421c36c0cb5df535a | |
| parent | 78a2617703bc1dada409f126db5c3db214913ff4 (diff) | |
Fix soft-apply detection of migrations with dependencies
| -rw-r--r-- | django/db/migrations/executor.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/db/migrations/executor.py b/django/db/migrations/executor.py index 7ebfe3d13b..9cbd1b04df 100644 --- a/django/db/migrations/executor.py +++ b/django/db/migrations/executor.py @@ -85,7 +85,7 @@ class MigrationExecutor(object): 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 @@ class MigrationExecutor(object): 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 |
