Cable type empty filtering not working #9949

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

Originally created by @betadrome on GitHub (Jul 8, 2024).

Originally assigned to: @bctiemann on GitHub.

Deployment Type

Self-hosted

NetBox Version

v.4.0.6

Python Version

3.11

Steps to Reproduce

  1. Go to https://netbox.example.com/dcim/cables/
  2. Filter type__empty=True (https://netbox.example.com/dcim/cables/?type__empty=True)
  3. Filter is not working

Expected Behavior

Only shows Cables without type

Observed Behavior

Filter shows all cables, seems like nothing was filtered

Originally created by @betadrome on GitHub (Jul 8, 2024). Originally assigned to: @bctiemann on GitHub. ### Deployment Type Self-hosted ### NetBox Version v.4.0.6 ### Python Version 3.11 ### Steps to Reproduce 1. Go to https://netbox.example.com/dcim/cables/ 2. Filter type__empty=True (https://netbox.example.com/dcim/cables/?type__empty=True) 3. Filter is not working ### Expected Behavior Only shows Cables without `type` ### Observed Behavior Filter shows all cables, seems like nothing was filtered
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:24:49 +01:00
adam closed this issue 2025-12-29 21:24:49 +01:00
Author
Owner

@betadrome commented on GitHub (Jul 9, 2024):

As this filtering is quite important to me, I tried again and found that the following works for me: https://netbox.example.com/dcim/cables/?type__n=cat3&type__n=cat5&type__n=cat5e&type__n=cat6&type__n=cat6a&type__n=cat7&type__n=cat7a&type__n=cat8&type__n=dac-active&type__n=dac-passive&type__n=mrj21-trunk&type__n=coaxial&type__n=mmf&type__n=mmf-om1&type__n=mmf-om2&type__n=mmf-om3&type__n=mmf-om4&type__n=mmf-om5&type__n=smf&type__n=smf-os1&type__n=smf-os2&type__n=aoc&type__n=power. Should the other spelling be possible in the future, it would still be quite helpful, but for now its fine for me!

@betadrome commented on GitHub (Jul 9, 2024): As this filtering is quite important to me, I tried again and found that the following works for me: `https://netbox.example.com/dcim/cables/?type__n=cat3&type__n=cat5&type__n=cat5e&type__n=cat6&type__n=cat6a&type__n=cat7&type__n=cat7a&type__n=cat8&type__n=dac-active&type__n=dac-passive&type__n=mrj21-trunk&type__n=coaxial&type__n=mmf&type__n=mmf-om1&type__n=mmf-om2&type__n=mmf-om3&type__n=mmf-om4&type__n=mmf-om5&type__n=smf&type__n=smf-os1&type__n=smf-os2&type__n=aoc&type__n=power`. Should the other spelling be possible in the future, it would still be quite helpful, but for now its fine for me!
Author
Owner

@arthanson commented on GitHub (Sep 3, 2024):

Potentially needs: https://django-filter.readthedocs.io/en/main/guide/tips.html#filtering-by-an-empty-string

@arthanson commented on GitHub (Sep 3, 2024): Potentially needs: https://django-filter.readthedocs.io/en/main/guide/tips.html#filtering-by-an-empty-string
Author
Owner

@betadrome commented on GitHub (Oct 4, 2024):

Hey, thanks for adding this feature/fixing this bug! It works as expected!

@betadrome commented on GitHub (Oct 4, 2024): Hey, thanks for adding this feature/fixing this bug! It works as expected!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9949