mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into 3960-legacy-device-status
This commit is contained in:
@@ -802,6 +802,7 @@ class InterfaceTypeChoices(ChoiceSet):
|
||||
TYPE_SUMMITSTACK128: 5310,
|
||||
TYPE_SUMMITSTACK256: 5320,
|
||||
TYPE_SUMMITSTACK512: 5330,
|
||||
TYPE_OTHER: 32767,
|
||||
}
|
||||
|
||||
|
||||
|
20
netbox/dcim/migrations/0091_interface_type_other.py
Normal file
20
netbox/dcim/migrations/0091_interface_type_other.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def interface_type_to_slug(apps, schema_editor):
|
||||
Interface = apps.get_model('dcim', 'Interface')
|
||||
Interface.objects.filter(type=32767).update(type='other')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0090_cable_termination_models'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# Missed type "other" in the initial migration (see #3967)
|
||||
migrations.RunPython(
|
||||
code=interface_type_to_slug
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user