mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -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
|
# 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.
|
# loop or reset back to no site and break the loop.
|
||||||
for interface in interfaces:
|
for interface in interfaces:
|
||||||
|
vm_site = interface.virtual_machine.site or interface.virtual_machine.cluster.site
|
||||||
if site is None:
|
if site is None:
|
||||||
site = interface.virtual_machine.cluster.site
|
site = vm_site
|
||||||
elif interface.virtual_machine.cluster.site is not site:
|
elif vm_site is not site:
|
||||||
site = None
|
site = None
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user