Path tracing broken for front/rear ports in REST API #10939

Closed
opened 2025-12-29 21:38:00 +01:00 by adam · 1 comment
Owner

Originally created by @srfwx on GitHub (Mar 24, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.6

Python Version

3.12

Steps to Reproduce

  1. Go to https://[SERVER_URL]/api/dcim/rear-ports/
  2. Select any existing port by clicking on its "url"
  3. The REST API now display the data for a single port, for example:
    https://[SERVER_URL]/api/dcim/rear-ports/70479/
  4. Append "paths/" to this URL: https://[SERVER_URL]/api/dcim/rear-ports/70479/paths

Expected Behavior

The REST API should return the CablePaths which traverse the given pass-through port.

Observed Behavior

'AttributeError' is raised.

'NoneType' object has no attribute 'model'

This error is not observed on NetBox 4.2.5
I believe this may have been introduced by https://github.com/netbox-community/netbox/pull/18826 ?

Originally created by @srfwx on GitHub (Mar 24, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.6 ### Python Version 3.12 ### Steps to Reproduce 1. Go to https://[SERVER_URL]/api/dcim/rear-ports/ 2. Select any existing port by clicking on its "url" 3. The REST API now display the data for a single port, for example: https://[SERVER_URL]/api/dcim/rear-ports/70479/ 4. Append "paths/" to this URL: https://[SERVER_URL]/api/dcim/rear-ports/70479/paths ### Expected Behavior The REST API should return the CablePaths which traverse the given pass-through port. ### Observed Behavior 'AttributeError' is raised. ``` 'NoneType' object has no attribute 'model' ``` This error is not observed on NetBox 4.2.5 I believe this may have been introduced by https://github.com/netbox-community/netbox/pull/18826 ?
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:38:00 +01:00
adam closed this issue 2025-12-29 21:38:00 +01:00
Author
Owner

@jnovinger commented on GitHub (Mar 25, 2025):

Looking at this now. It appears to work in the feature branch. Not sure what might have "fixed" it. Ah, I think it's as simple as the work for #18826 hasn't been included in feature yet.

@jnovinger commented on GitHub (Mar 25, 2025): Looking at this now. It appears to work in the `feature` branch. ~~Not sure what might have "fixed" it.~~ Ah, I think it's as simple as the work for #18826 hasn't been included in `feature` yet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10939