Skip to content

AttributeError in ObjectChangeViewSet browsable API: 'NoneType' object has no attribute 'model' #20641

@jnovinger

Description

@jnovinger

NetBox Edition: NetBox Community

NetBox Version: v4.4.4

Python Version: 3.12

Steps to Reproduce:

  1. Navigate to http://127.0.0.1:8000/api/core/object-changes/ in a web browser (Firefox, Chrome, Safari)
  2. Observe the AttributeError

Alternatively, reproduce via curl:

curl 'http://127.0.0.1:8000/api/core/object-changes/' \
  -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'

Expected Behavior:

The browsable API page should render with the list of object changes.

Observed Behavior:

The request fails with an AttributeError:

AttributeError at /api/core/object-changes/
'NoneType' object has no attribute 'model'

Exception Location: /path/to/netbox/utilities/api.py, line 77, in get_view_name

The API endpoint functions correctly when accessed with Accept: application/json or with the ?format=json query parameter. The bug only appears to affect HTML rendering for browser access.

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions