diff --git a/docs/release-notes/version-2.7.md b/docs/release-notes/version-2.7.md index 83e88cf59..1be984090 100644 --- a/docs/release-notes/version-2.7.md +++ b/docs/release-notes/version-2.7.md @@ -11,6 +11,7 @@ * [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant * [#3953](https://github.com/netbox-community/netbox/issues/3953) - Fix validation error when creating child devices * [#3960](https://github.com/netbox-community/netbox/issues/3960) - Fix legacy device status choice +* [#3967](https://github.com/netbox-community/netbox/issues/3967) - Resolve migration of "other" interface type --- diff --git a/mkdocs.yml b/mkdocs.yml index 686c04a1d..5e2179eb3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -12,6 +12,7 @@ pages: - 4. LDAP (Optional): 'installation/4-ldap.md' - Upgrading NetBox: 'installation/upgrading.md' - Migrating to Python3: 'installation/migrating-to-python3.md' + - Migrating to systemd: 'installation/migrating-to-systemd.md' - Configuration: - Configuring NetBox: 'configuration/index.md' - Required Settings: 'configuration/required-settings.md' diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 34bd8101b..6ceefa878 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -802,6 +802,7 @@ class InterfaceTypeChoices(ChoiceSet): TYPE_SUMMITSTACK128: 5310, TYPE_SUMMITSTACK256: 5320, TYPE_SUMMITSTACK512: 5330, + TYPE_OTHER: 32767, } diff --git a/netbox/dcim/migrations/0091_interface_type_other.py b/netbox/dcim/migrations/0091_interface_type_other.py new file mode 100644 index 000000000..1ea24885f --- /dev/null +++ b/netbox/dcim/migrations/0091_interface_type_other.py @@ -0,0 +1,20 @@ +from django.db import migrations + + +def interface_type_to_slug(apps, schema_editor): + Interface = apps.get_model('dcim', 'Interface') + Interface.objects.filter(type=32767).update(type='other') + + +class Migration(migrations.Migration): + + dependencies = [ + ('dcim', '0090_cable_termination_models'), + ] + + operations = [ + # Missed type "other" in the initial migration (see #3967) + migrations.RunPython( + code=interface_type_to_slug + ), + ]