mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 12:22:23 -06:00
Migrate keystone interfaces to new data type
This commit is contained in:
19
netbox/dcim/migrations/0099_interface_type_keystone.py
Normal file
19
netbox/dcim/migrations/0099_interface_type_keystone.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def interface_type_to_slug(apps, schema_editor):
|
||||
Interface = apps.get_model('dcim', 'Interface')
|
||||
Interface.objects.filter(type=32766).update(type='keystone')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0098_devicetype_images'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
code=interface_type_to_slug
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user