Skip to content

Commit 792b353

Browse files
committed
Fixes #14363: Fix bulk editing of interfaces assigned to VM with no cluster
1 parent 01ba4ce commit 792b353

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

netbox/virtualization/forms/bulk_edit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,10 @@ def __init__(self, *args, **kwargs):
294294
# Check interface sites. First interface should set site, further interfaces will either continue the
295295
# loop or reset back to no site and break the loop.
296296
for interface in interfaces:
297+
vm_site = interface.virtual_machine.site or interface.virtual_machine.cluster.site
297298
if site is None:
298-
site = interface.virtual_machine.cluster.site
299-
elif interface.virtual_machine.cluster.site is not site:
299+
site = vm_site
300+
elif vm_site is not site:
300301
site = None
301302
break
302303

0 commit comments

Comments
 (0)