Bulk edit of Interfaces of VMs without cluster fails #8889

Closed
opened 2025-12-29 20:42:31 +01:00 by adam · 0 comments
Owner

Originally created by @larsux on GitHub (Nov 28, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.6.5

Python version

3.8

Steps to Reproduce

  1. Create VM and assign only a Site, not a Cluster
  2. Create Interface for VM
  3. Mark Interface and click on "Edit Selected"

Expected Behavior

Edit form for selected VM Interface(s) appear

Observed Behavior

Exception Window with the following Content:

<class 'AttributeError'>

'NoneType' object has no attribute 'site'

Python version: 3.8.10
NetBox version: 3.6.5
Plugins: 
  netbox_demo: 0.3.1

When generating the bulk edit form, the site is extracted from the cluster of the virtual machine, which fails if no cluster is assigned to the VM:

  File "/opt/netbox/netbox/virtualization/forms/bulk_edit.py", line 272, in __init__
     site = interface.virtual_machine.cluster.site
AttributeError: 'NoneType' object has no attribute 'site'
Originally created by @larsux on GitHub (Nov 28, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.6.5 ### Python version 3.8 ### Steps to Reproduce 1. Create VM and assign only a Site, not a Cluster 2. Create Interface for VM 3. Mark Interface and click on "Edit Selected" ### Expected Behavior Edit form for selected VM Interface(s) appear ### Observed Behavior Exception Window with the following Content: ``` <class 'AttributeError'> 'NoneType' object has no attribute 'site' Python version: 3.8.10 NetBox version: 3.6.5 Plugins: netbox_demo: 0.3.1 ``` When generating the bulk edit form, the site is extracted from the cluster of the virtual machine, which fails if no cluster is assigned to the VM: ``` File "/opt/netbox/netbox/virtualization/forms/bulk_edit.py", line 272, in __init__ site = interface.virtual_machine.cluster.site AttributeError: 'NoneType' object has no attribute 'site' ```
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:42:32 +01:00
adam closed this issue 2025-12-29 20:42:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8889