# Generated by Django 4.0.3 on 2022-04-07 17:28

import django.db.models.deletion
from django.db import migrations, models


def delete_alerts_without_agent(apps, schema):
    Alert = apps.get_model("alerts", "Alert")

    Alert.objects.filter(agent=None).delete()


class Migration(migrations.Migration):

    dependencies = [
        ("agents", "0047_alter_agent_plat_alter_agent_site"),
        ("alerts", "0010_auto_20210917_1954"),
    ]

    operations = [
        migrations.RunPython(
            delete_alerts_without_agent, reverse_code=migrations.RunPython.noop
        ),
    ]
