Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering by None/null device on asset endpoint yields ValueError #197

Open
sylvia-cs opened this issue Sep 26, 2024 · 1 comment
Open

Comments

@sylvia-cs
Copy link

sylvia-cs commented Sep 26, 2024

Netbox Version

v3.4.8

Issue

Selecting ‘None’ option for device in /assets endpoint triggers ValueError on Netbox side. Attempted workaround by setting installed_device_name=null in request also fails with empty results (appears to be searching for string "null" rather than value null).
Screenshot 2024-09-25 at 3 27 51 PM
Screenshot 2024-09-25 at 3 28 01 PM
Screenshot 2024-09-25 at 3 30 09 PM

@matejv
Copy link
Member

matejv commented Oct 4, 2024

Thank you for reporting this. For now you can use Is assigned to hardware : No filter to get only assets that aren't installed for example.

But the issues should be fixed, I agree. The logic for filtering assets on installed device, location, site, etc. has gotten quite complex, so I'll have to take a bit more time to fix this.

Note to self: all filters that use query_located() need to be checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants