Skip to content

Bulk edit of Interfaces of VMs without cluster fails #14363

@larsux

Description

@larsux

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'

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions