Simpler migration
This commit is contained in:
parent
9a081ddae0
commit
06a89055c4
1 changed files with 2 additions and 6 deletions
|
@ -6,13 +6,9 @@ from django.db import migrations, models
|
|||
|
||||
def adapt_operation_types(apps, schema_editor):
|
||||
Operation = apps.get_model("kfet", "Operation")
|
||||
edits = Operation.objects.filter(
|
||||
Operation.objects.filter(
|
||||
is_checkout=False,
|
||||
type__in=['withdraw', 'deposit'])
|
||||
|
||||
for ope in edits:
|
||||
ope.type = 'edit'
|
||||
ope.save()
|
||||
type__in=['withdraw', 'deposit']).update(type='edit')
|
||||
|
||||
|
||||
def revert_operation_types(apps, schema_editor):
|
||||
|
|
Loading…
Reference in a new issue