-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Milestone
Description
NetBox Edition
NetBox Community
NetBox Version
v4.4.2
Python Version
3.12
Steps to Reproduce
Filtering vlan_group_list
by a scalar VLAN ID using the vid_ranges.contains
GraphQL filter returns an error instead of matching groups whose VID ranges include the value.
- Ensure a
VLANGroup
exists withvid_ranges
that include VLAN 10 (e.g.,[1,11)
). - Run the GraphQL query below against
/graphql/
. - The request fails with the error shown instead of returning the matching
VLANGroup
.
query MyQuery {
vlan_group_list(filters: { vid_ranges: { contains: 10 } }) {
id
name
vid_ranges
}
}
Expected Behavior
The query should succeed and return all VLANGroup
records whose vid_ranges
include the given VLAN ID (e.g., 10
), without errors.
If no groups match, the API should return an empty list. The response should include the requested fields for each matching group.
Observed Behavior
{
"data": null,
"errors": [
{
"message": "cannot cast type integer to int4range\nLINE 1: ... WHERE \"ipam_vlangroup\".\"vid_ranges\" @> (ARRAY[10])::int4...\n ^",
"path": ["vlan_group_list"]
}
]
}
Server traceback (excerpt)
django.db.utils.ProgrammingError: cannot cast type integer to int4range
LINE 1: ... "ipam_vlangroup"."vid_ranges" @> (ARRAY[10])::int4...
^
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application