Skip to content

REST API devices filter by serial number does not follow the convention for multiple values of the same parameter to resolve by logical 'or' condition #8010

@irozkov

Description

@irozkov

NetBox version

v2.11.12

Python version

3.7

Steps to Reproduce

Issue REST API request to get devices list by two serials (both devices with these serials should exist):
GET api/dcim/devices/?serial=1111&serial=222&brief=1

Expected Behavior

API returns info for two devices, provided we have no duplicate devices with these serial numbers:
{
"count": 2,
"next": null,
"previous": null,
"results": [
{ .... },
{ .... }
]
}

Observed Behavior

API returns info for the device which serial is set as last parameter in GET query
{
"count": 1,
...
}
This is also true for v3.0.11 and v3.1.0

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions