Move Keystone migration to Other migration

This commit is contained in:
Marco Ceppi 2020-03-10 14:43:45 -04:00
parent 2f4b566b9a
commit c1a247b9c7
2 changed files with 3 additions and 19 deletions

View File

@ -5,6 +5,9 @@ def interface_type_to_slug(apps, schema_editor):
Interface = apps.get_model('dcim', 'Interface')
Interface.objects.filter(type=32767).update(type='other')
Interface = apps.get_model('dcim', 'Interface')
Interface.objects.filter(type=32766).update(type='keystone')
class Migration(migrations.Migration):

View File

@ -1,19 +0,0 @@
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
),
]