# Generated by Django 2.2.13 on 2020-07-26 19:34

from django.db import migrations


def group_creators(apps, schema_editor):
    Group = apps.get_model("groups", "Group")
    User = apps.get_model("auth", "User")
    for group in Group.objects.all():
        group.created_by = group.teachers.all()[0]
        group.save()


class Migration(migrations.Migration):

    dependencies = [
        ('groups', '0004_auto_20200726_1934'),
    ]

    operations = [
        migrations.RunPython(group_creators)
    ]
