Circuits View not working with custom fields #11270

Closed
opened 2025-12-29 21:42:43 +01:00 by adam · 2 comments
Owner

Originally created by @tobikris on GitHub (Jun 6, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.2

Python Version

3.12

Steps to Reproduce

  1. Add Custom Field with name provider_id for Object Type "Circuit", leave settings on default.
  2. Open the list of circuits.

Expected Behavior

The circuits should be shown.

Observed Behavior

<class 'ValueError'>

'provider_id' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().

Python version: 3.12.9
NetBox version: 4.3.2
Plugins: 
  netbox_demo: 0.5.0
Originally created by @tobikris on GitHub (Jun 6, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.2 ### Python Version 3.12 ### Steps to Reproduce 1. Add Custom Field with name `provider_id` for Object Type "Circuit", leave settings on default. 2. Open the list of circuits. ### Expected Behavior The circuits should be shown. ### Observed Behavior ``` <class 'ValueError'> 'provider_id' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related(). Python version: 3.12.9 NetBox version: 4.3.2 Plugins: netbox_demo: 0.5.0 ```
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:42:43 +01:00
adam closed this issue 2025-12-29 21:42:43 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 6, 2025):

This seems to stem from a collision with the built-in field provider_id in the table somewhere. Renaming the custom field to e.g. provider_id2 resolves the problem.

@jeremystretch commented on GitHub (Jun 6, 2025): This seems to stem from a collision with the built-in field `provider_id` in the table somewhere. Renaming the custom field to e.g. `provider_id2` resolves the problem.
Author
Owner

@tobikris commented on GitHub (Jun 6, 2025):

Oh, wow. That explains why we did not find any other issue - no report and no other affected object type. Thanks for the quick fix and workaround!

@tobikris commented on GitHub (Jun 6, 2025): Oh, wow. That explains why we did not find any other issue - no report and no other affected object type. Thanks for the quick fix and workaround!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11270