jeremystretch 3 лет назад
Родитель
Сommit
1e1ce550c0
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      netbox/ipam/migrations/0059_l2vpn.py

+ 5 - 5
netbox/ipam/migrations/0059_l2vpn_l2vpntermination_and_more.py → netbox/ipam/migrations/0059_l2vpn.py

@@ -1,4 +1,4 @@
-# Generated by Django 4.0.5 on 2022-06-28 04:57
+# Generated by Django 4.0.5 on 2022-07-06 16:51
 
 import django.core.serializers.json
 from django.db import migrations, models
@@ -9,9 +9,9 @@ import taggit.managers
 class Migration(migrations.Migration):
 
     dependencies = [
+        ('extras', '0076_configcontext_locations'),
         ('contenttypes', '0002_remove_content_type_name'),
         ('tenancy', '0007_contact_link'),
-        ('extras', '0076_configcontext_locations'),
         ('ipam', '0058_ipaddress_nat_inside_nonunique'),
     ]
 
@@ -31,7 +31,7 @@ class Migration(migrations.Migration):
                 ('export_targets', models.ManyToManyField(blank=True, related_name='exporting_l2vpns', to='ipam.routetarget')),
                 ('import_targets', models.ManyToManyField(blank=True, related_name='importing_l2vpns', to='ipam.routetarget')),
                 ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
-                ('tenant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='l2vpns', to='tenancy.tenant')),
+                ('tenant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='l2vpns', to='tenancy.tenant')),
             ],
             options={
                 'verbose_name': 'L2VPN',
@@ -45,8 +45,8 @@ class Migration(migrations.Migration):
                 ('created', models.DateTimeField(auto_now_add=True, null=True)),
                 ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                 ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder)),
-                ('assigned_object_id', models.PositiveBigIntegerField(blank=True, null=True)),
-                ('assigned_object_type', models.ForeignKey(blank=True, limit_choices_to=models.Q(models.Q(models.Q(('app_label', 'dcim'), ('model', 'interface')), models.Q(('app_label', 'ipam'), ('model', 'vlan')), models.Q(('app_label', 'virtualization'), ('model', 'vminterface')), _connector='OR')), null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
+                ('assigned_object_id', models.PositiveBigIntegerField()),
+                ('assigned_object_type', models.ForeignKey(limit_choices_to=models.Q(models.Q(models.Q(('app_label', 'dcim'), ('model', 'interface')), models.Q(('app_label', 'ipam'), ('model', 'vlan')), models.Q(('app_label', 'virtualization'), ('model', 'vminterface')), _connector='OR')), on_delete=django.db.models.deletion.PROTECT, related_name='+', to='contenttypes.contenttype')),
                 ('l2vpn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='terminations', to='ipam.l2vpn')),
                 ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
             ],