diff --git a/kfet/migrations/0049_remove_checkout.py b/kfet/migrations/0049_remove_checkout.py index 29d15676..8328c9c4 100644 --- a/kfet/migrations/0049_remove_checkout.py +++ b/kfet/migrations/0049_remove_checkout.py @@ -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):