# Generated by Django 2.2.13 on 2020-10-04 22:50

from django.db import migrations, models

from turkle.models import Batch


def update_existing_batches(apps, schema_editor):
    for batch in Batch.objects.all():
        batch.update_completed_status()


class Migration(migrations.Migration):

    dependencies = [
        ('turkle', '0008_fix_multi_assignment_anonymous_batches'),
    ]

    operations = [
        migrations.AddField(
            model_name='batch',
            name='completed',
            field=models.BooleanField(default=False),
        ),
        migrations.RunPython(update_existing_batches),
    ]
