1 # Generated by Django 2.2 on 2020-02-18 15:36
3 from django.conf import settings
4 from django.db import migrations
7 def clear_networks(apps, schema_editor):
8 Network = apps.get_model('resource_inventory', 'Network')
9 Vlan = apps.get_model('resource_inventory', 'Vlan')
10 for vlan in Vlan.objects.all():
12 for net in Network.objects.all():
16 class Migration(migrations.Migration):
19 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
20 ('resource_inventory', '0012_auto_20200103_1850'),
24 migrations.RunPython(clear_networks)