Prechádzať zdrojové kódy

fixes for #10070 make l2vpn slug unique (#10119)

Co-authored-by: jeremystretch <jstretch@ns1.com>
Arthur Hanson 3 rokov pred
rodič
commit
4132027ada

+ 18 - 0
netbox/ipam/migrations/0060_alter_l2vpn_slug.py

@@ -0,0 +1,18 @@
+# Generated by Django 4.0.7 on 2022-08-22 15:58
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('ipam', '0059_l2vpn'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='l2vpn',
+            name='slug',
+            field=models.SlugField(max_length=100, unique=True),
+        ),
+    ]

+ 4 - 1
netbox/ipam/models/l2vpn.py

@@ -21,7 +21,10 @@ class L2VPN(NetBoxModel):
         max_length=100,
         unique=True
     )
-    slug = models.SlugField()
+    slug = models.SlugField(
+        max_length=100,
+        unique=True
+    )
     type = models.CharField(
         max_length=50,
         choices=L2VPNTypeChoices