# Generated by Django 3.0.8 on 2020-09-13 16:21

from django.db import migrations


def default_to_show_casting(apps, schema_editor):
    # We get the model from the versioned app registry;
    # if we directly import it, it'll be the wrong version
    Ordering = apps.get_model("scheduler", "Ordering")
    for order in Ordering.objects.filter(
            role__exact='',
            allocation__event__eventlabel__text="General"):
        order.role = "Regular Act"
        order.save()


class Migration(migrations.Migration):

    dependencies = [
        ('scheduler', '0001_initial'),
        ('gbe', '0002_auto_20200912_1446'),
    ]

    operations = [
        migrations.RunPython(default_to_show_casting)
    ]
