Просмотр исходного кода

Fixes #8127: Fix disassociation of interface under IP address edit view

jeremystretch 4 лет назад
Родитель
Сommit
344fb638fd
2 измененных файлов с 4 добавлено и 1 удалено
  1. 2 1
      docs/release-notes/version-3.1.md
  2. 2 0
      netbox/ipam/forms/models.py

+ 2 - 1
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
 
 ---
 

+ 2 - 0
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')