mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
Migrate keystone interfaces to new data type
This commit is contained in:
parent
f472edda9f
commit
6f35a4086d
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
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user