Device component filter search returns full queryset #6307

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

Originally created by @DanSheps on GitHub (Apr 6, 2022).

Originally assigned to: @DanSheps on GitHub.

NetBox version

3.2.0

Python version

3.9

Steps to Reproduce

  1. Create a site
  2. Create a manufacturer
  3. Create a device type
  4. Create a device role
  5. Create a device
  6. Add components to device (interfaces: Gi1/0/1-48)
  7. Attempt to filter on 1/0/20

Expected Behavior

Only Gi1/0/20 will be returned

Observed Behavior

Full unfiltered queryset is returned

Originally created by @DanSheps on GitHub (Apr 6, 2022). Originally assigned to: @DanSheps on GitHub. ### NetBox version 3.2.0 ### Python version 3.9 ### Steps to Reproduce 1. Create a site 2. Create a manufacturer 3. Create a device type 4. Create a device role 5. Create a device 6. Add components to device (interfaces: Gi1/0/1-48) 7. Attempt to filter on 1/0/20 ### Expected Behavior Only Gi1/0/20 will be returned ### Observed Behavior Full unfiltered queryset is returned
adam added the type: bugstatus: accepted labels 2025-12-29 19:39:12 +01:00
adam closed this issue 2025-12-29 19:39:12 +01:00
Author
Owner

@DanSheps commented on GitHub (Apr 6, 2022):

This is due to the fact that search() is not overridden from the NetBoxModelFilterSet due to the inheritance ordering. By default, NetBoxModelFilterSet returns the full queryset.

@DanSheps commented on GitHub (Apr 6, 2022): This is due to the fact that search() is not overridden from the NetBoxModelFilterSet due to the inheritance ordering. By default, NetBoxModelFilterSet returns the full queryset.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6307