1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Correct Rack.type migration logic

This commit is contained in:
Jeremy Stretch
2019-11-15 21:50:33 -05:00
parent 07aa036fe8
commit e1e09bff9b

View File

@@ -12,7 +12,7 @@ RACK_TYPE_CHOICES = (
def rack_type_to_slug(apps, schema_editor):
Rack = apps.get_model('dcim', 'Rack')
for id, slug in RACK_TYPE_CHOICES:
Rack.objects.filter(status=str(id)).update(status=slug)
Rack.objects.filter(type=str(id)).update(type=slug)
class Migration(migrations.Migration):