API lookup expressions stopped working #10338

Closed
opened 2025-12-29 21:30:12 +01:00 by adam · 4 comments
Owner

Originally created by @FestplattenSchnitzel on GitHub (Oct 8, 2024).

Deployment Type

Self-hosted

NetBox Version

4.1.3

Python Version

3.12.3

Steps to Reproduce

Run e.g. https://demo.netbox.dev/api/dcim/interfaces/?type__n=virtual as described in https://demo.netbox.dev/static/docs/reference/filtering/#lookup-expressions .

Expected Behavior

The query should return the results as described in https://demo.netbox.dev/static/docs/reference/filtering/#lookup-expressions .

Observed Behavior

HTTP 400 Bad Request
Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE
Content-Type: application/json
Vary: Accept

{
    "type__n": [
        "Select a valid choice. virtual is not one of the available choices."
    ]
}
Originally created by @FestplattenSchnitzel on GitHub (Oct 8, 2024). ### Deployment Type Self-hosted ### NetBox Version 4.1.3 ### Python Version 3.12.3 ### Steps to Reproduce Run e.g. https://demo.netbox.dev/api/dcim/interfaces/?type__n=virtual as described in https://demo.netbox.dev/static/docs/reference/filtering/#lookup-expressions . ### Expected Behavior The query should return the results as described in https://demo.netbox.dev/static/docs/reference/filtering/#lookup-expressions . ### Observed Behavior ``` HTTP 400 Bad Request Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE Content-Type: application/json Vary: Accept { "type__n": [ "Select a valid choice. virtual is not one of the available choices." ] } ```
adam added the type: bugstatus: revisions needed labels 2025-12-29 21:30:12 +01:00
adam closed this issue 2025-12-29 21:30:13 +01:00
Author
Owner

@FestplattenSchnitzel commented on GitHub (Oct 8, 2024):

Seems like (all?) other queries, e.g. https://demo.netbox.dev/api/ipam/prefixes/?status__n=container , are broken too.

@FestplattenSchnitzel commented on GitHub (Oct 8, 2024): Seems like (all?) other queries, e.g. https://demo.netbox.dev/api/ipam/prefixes/?status__n=container , are broken too.
Author
Owner

@arthanson commented on GitHub (Oct 9, 2024):

@FestplattenSchnitzel can you please check the version number, this was just fixed in 4.1.3 so I want to double-check the version you are using.

@arthanson commented on GitHub (Oct 9, 2024): @FestplattenSchnitzel can you please check the version number, this was just fixed in 4.1.3 so I want to double-check the version you are using.
Author
Owner

@FestplattenSchnitzel commented on GitHub (Oct 9, 2024):

We're definitely using Netbox version 4.1.3 from docker.io. The deployment happened around 2024-10-03 15:30 UTC in case that's relevant.

Also, is this even relevant since the behaviour is reproducible on the demo instance (which reports version 4.1.3 as well)?

@FestplattenSchnitzel commented on GitHub (Oct 9, 2024): We're definitely using Netbox version 4.1.3 from docker.io. The deployment happened around 2024-10-03 15:30 UTC in case that's relevant. Also, is this even relevant since the behaviour is reproducible on the demo instance (which reports version 4.1.3 as well)?
Author
Owner

@bctiemann commented on GitHub (Oct 11, 2024):

@FestplattenSchnitzel sorry about the bad timing -- this fix https://github.com/netbox-community/netbox/pull/17670 will be in the next release.

@bctiemann commented on GitHub (Oct 11, 2024): @FestplattenSchnitzel sorry about the bad timing -- this fix https://github.com/netbox-community/netbox/pull/17670 will be in the next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10338