Просмотр исходного кода

Bump platform name/slug max length to 100 chars (#3318)

Jeremy Stretch 6 лет назад
Родитель
Сommit
a8ca536d44

+ 1 - 1
CHANGELOG.md

@@ -4,7 +4,7 @@ v2.6.4 (FUTURE)
 
 * [#2160](https://github.com/netbox-community/netbox/issues/2160) - Add bulk editing for interface VLAN assignment
 * [#3027](https://github.com/netbox-community/netbox/issues/3028) - Add `local_context_data` boolean filter for devices
-* [#3318](https://github.com/netbox-community/netbox/issues/3318) - Increase length of platform name and slug to 64 characters
+* [#3318](https://github.com/netbox-community/netbox/issues/3318) - Increase length of platform name and slug to 100 characters
 * [#3341](https://github.com/netbox-community/netbox/issues/3341) - Enable inline VLAN assignment while editing an interface
 
 ## Bug Fixes

+ 2 - 2
netbox/dcim/migrations/0074_increase_field_length_platform_name_slug.py

@@ -13,11 +13,11 @@ class Migration(migrations.Migration):
         migrations.AlterField(
             model_name='platform',
             name='name',
-            field=models.CharField(max_length=64, unique=True),
+            field=models.CharField(max_length=100, unique=True),
         ),
         migrations.AlterField(
             model_name='platform',
             name='slug',
-            field=models.SlugField(max_length=64, unique=True),
+            field=models.SlugField(max_length=100, unique=True),
         ),
     ]

+ 2 - 2
netbox/dcim/models.py

@@ -1385,12 +1385,12 @@ class Platform(ChangeLoggedModel):
     specifying a NAPALM driver.
     """
     name = models.CharField(
-        max_length=64,
+        max_length=100,
         unique=True
     )
     slug = models.SlugField(
         unique=True,
-        max_length=64
+        max_length=100
     )
     manufacturer = models.ForeignKey(
         to='dcim.Manufacturer',