From 344fb638fd11ce97b35f4b0365bfa16a24d7711d Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 21 Dec 2021 13:17:54 -0500 Subject: [PATCH] Fixes #8127: Fix disassociation of interface under IP address edit view --- docs/release-notes/version-3.1.md | 3 ++- netbox/ipam/forms/models.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md index 5ff6ea1bb..2128abdb6 100644 --- a/docs/release-notes/version-3.1.md +++ b/docs/release-notes/version-3.1.md @@ -5,14 +5,15 @@ ### Enhancements * [#8100](https://github.com/netbox-community/netbox/issues/8100) - Add "other" choice for FHRP group protocol -* [#8134](https://github.com/netbox-community/netbox/issues/8134) - Fix issue where HTMX-swapped UI elements needed to be reinitialized ### Bug Fixes * [#7246](https://github.com/netbox-community/netbox/issues/7246) - Don't attempt to URL-decode NAPALM response payloads * [#7962](https://github.com/netbox-community/netbox/issues/7962) - Fix user menu under report/script result view * [#8097](https://github.com/netbox-community/netbox/issues/8097) - Fix styling of Markdown tables +* [#8127](https://github.com/netbox-community/netbox/issues/8127) - Fix disassociation of interface under IP address edit view * [#8131](https://github.com/netbox-community/netbox/issues/8131) - Restore annotation of available IPs under prefix IPs view +* [#8134](https://github.com/netbox-community/netbox/issues/8134) - Fix bulk editing of objects within dynamic tables --- diff --git a/netbox/ipam/forms/models.py b/netbox/ipam/forms/models.py index 319d8671e..c5e3146e9 100644 --- a/netbox/ipam/forms/models.py +++ b/netbox/ipam/forms/models.py @@ -471,6 +471,8 @@ class IPAddressForm(TenancyForm, CustomFieldModelForm): }) elif selected_objects: self.instance.assigned_object = self.cleaned_data[selected_objects[0]] + else: + self.instance.assigned_object = None # Primary IP assignment is only available if an interface has been assigned. interface = self.cleaned_data.get('interface') or self.cleaned_data.get('vminterface')