# Generated by Django 4.2.19 on 2025-03-17 18:24

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ("NEMO", "0108_landingpagechoice_view_permission"),
    ]

    def update_customization_area_logout_already_logged_in(apps, schema_editor):
        Customization = apps.get_model("NEMO", "Customization")
        customization_area_access = Customization.objects.filter(name="area_logout_already_logged_in").first()
        if customization_area_access:
            customization_area_access.name = "area_access_logout_already_logged_in"
            customization_area_access.save()
            Customization.objects.filter(name="area_logout_already_logged_in").delete()

    def update_customization_area_logout_already_logged_in_reverse(apps, schema_editor):
        Customization = apps.get_model("NEMO", "Customization")
        customization_area_access = Customization.objects.filter(name="area_access_logout_already_logged_in").first()
        if customization_area_access:
            customization_area_access.name = "area_logout_already_logged_in"
            customization_area_access.save()
            Customization.objects.filter(name="area_access_logout_already_logged_in").delete()

    operations = [
        migrations.RunPython(
            update_customization_area_logout_already_logged_in,
            update_customization_area_logout_already_logged_in_reverse,
        )
    ]
