# Generated by Django 3.2.20 on 2023-10-10 13:05

from django.db import migrations
from django.db.migrations import RunPython


def trigger_due_date_save(apps, schema_editor):
    # need to load concrete model, so that wagtail page has `specific` instance  method...
    from vbv_lernwelt.duedate.models import DueDate

    for due_date in DueDate.objects.all():
        # trigger save to prefetch circle data
        due_date.save()


class Migration(migrations.Migration):
    dependencies = [
        ("duedate", "0006_duedate_circle_data"),
    ]

    operations = [RunPython(trigger_due_date_save)]
