parent
a81282a512
commit
39e2ad4532
|
@ -425,7 +425,7 @@ class MigrationAutodetector(object):
|
|||
options=model_state.options,
|
||||
bases=model_state.bases,
|
||||
),
|
||||
dependencies = dependencies,
|
||||
dependencies=dependencies,
|
||||
)
|
||||
# Generate operations for each related field
|
||||
for name, field in sorted(related_fields.items()):
|
||||
|
@ -524,7 +524,7 @@ class MigrationAutodetector(object):
|
|||
bases=model_state.bases,
|
||||
),
|
||||
# Depend on the deletion of any possible non-proxy version of us
|
||||
dependencies = dependencies,
|
||||
dependencies=dependencies,
|
||||
)
|
||||
|
||||
def generate_deleted_models(self):
|
||||
|
@ -815,7 +815,7 @@ class MigrationAutodetector(object):
|
|||
name=model_name,
|
||||
order_with_respect_to=new_model_state.options.get('order_with_respect_to', None),
|
||||
),
|
||||
dependencies = dependencies,
|
||||
dependencies=dependencies,
|
||||
)
|
||||
|
||||
def arrange_for_graph(self, changes, graph):
|
||||
|
|
|
@ -163,8 +163,8 @@ class MigrationOptimizer(object):
|
|||
"""
|
||||
Folds a CreateModel and a DeleteModel into nothing.
|
||||
"""
|
||||
if operation.name.lower() == other.name.lower() and \
|
||||
not operation.options.get("proxy", False):
|
||||
if (operation.name.lower() == other.name.lower() and
|
||||
not operation.options.get("proxy", False)):
|
||||
return []
|
||||
|
||||
def reduce_model_alter_delete(self, operation, other, in_between):
|
||||
|
|
|
@ -237,8 +237,8 @@ class OperationTests(MigrationTestBase):
|
|||
operation = migrations.CreateModel(
|
||||
"ProxyPony",
|
||||
[],
|
||||
options = {"proxy": True},
|
||||
bases = ("test_crprmo.Pony", ),
|
||||
options={"proxy": True},
|
||||
bases=("test_crprmo.Pony", ),
|
||||
)
|
||||
new_state = project_state.clone()
|
||||
operation.state_forwards("test_crprmo", new_state)
|
||||
|
|
Loading…
Reference in New Issue