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

Closed
opened 2025-12-29 21:49:30 +01:00 by adam · 0 comments
Owner

Originally created by @jnovinger on GitHub (Oct 21, 2025).

Originally assigned to: @jnovinger on GitHub.

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.

Originally created by @jnovinger on GitHub (Oct 21, 2025). Originally assigned to: @jnovinger on GitHub. **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: ```bash 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.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:49:30 +01:00
adam closed this issue 2025-12-29 21:49:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11755