mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fixes #14363: Fix bulk editing of interfaces assigned to VM with no cluster
This commit is contained in:
parent
01ba4ce129
commit
792b353f64
@ -294,9 +294,10 @@ class VMInterfaceBulkEditForm(NetBoxModelBulkEditForm):
|
||||
# Check interface sites. First interface should set site, further interfaces will either continue the
|
||||
# loop or reset back to no site and break the loop.
|
||||
for interface in interfaces:
|
||||
vm_site = interface.virtual_machine.site or interface.virtual_machine.cluster.site
|
||||
if site is None:
|
||||
site = interface.virtual_machine.cluster.site
|
||||
elif interface.virtual_machine.cluster.site is not site:
|
||||
site = vm_site
|
||||
elif vm_site is not site:
|
||||
site = None
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user