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

Fixes #3967: Fix missing migration for interface templates of type "other"

This commit is contained in:
Jeremy Stretch
2020-02-18 16:56:50 -05:00
parent ae1767b5d0
commit 8cfb5ac5c6
2 changed files with 21 additions and 0 deletions

View File

@ -8,6 +8,7 @@
## Bug Fixes
* [#2519](https://github.com/netbox-community/netbox/issues/2519) - Avoid race condition when provisioning "next available" IPs/prefixes via the API
* [#3967](https://github.com/netbox-community/netbox/issues/3967) - Fix missing migration for interface templates of type "other"
* [#4168](https://github.com/netbox-community/netbox/issues/4168) - Role is not required when creating a virtual machine
* [#4175](https://github.com/netbox-community/netbox/issues/4175) - Fix potential exception when bulk editing objects from a filtered list
* [#4179](https://github.com/netbox-community/netbox/issues/4179) - Site is required when creating a rack group or power panel

View File

@ -0,0 +1,20 @@
from django.db import migrations
def interfacetemplate_type_to_slug(apps, schema_editor):
InterfaceTemplate = apps.get_model('dcim', 'InterfaceTemplate')
InterfaceTemplate.objects.filter(type=32767).update(type='other')
class Migration(migrations.Migration):
dependencies = [
('dcim', '0096_interface_ordering'),
]
operations = [
# Missed type "other" in the initial migration (see #3967)
migrations.RunPython(
code=interfacetemplate_type_to_slug
),
]