# Generated by Django 3.0.9 on 2020-09-10 19:01

from django.db import migrations
from django.db.models.signals import pre_save
from edc_utils import DisableSignals


def update_visit_and_metadata(apps, schema_editor):
    subject_visit_model_cls = apps.get_model("inte_subject.subjectvisit")
    for subject_visit in subject_visit_model_cls.objects.all():
        with DisableSignals(disabled_signals=[pre_save]):
            subject_visit.save()


class Migration(migrations.Migration):

    dependencies = [
        ("inte_subject", "0052_auto_20200910_2127"),
    ]

    operations = [migrations.RunPython(update_visit_and_metadata)]
