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 device components by device name accepts only one value #3862

Closed
jeremystretch opened this issue Jan 8, 2020 · 0 comments
Closed
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.11

Steps to Reproduce

  1. Create at least two devices named device1 and device2
  2. Create one console port on each device
  3. Make a request for GET /api/dcim/console-ports/?name=device1&name=device2

Expected Behavior

Both console ports should be returned.

Observed Behavior

Only the console port belonging to device2 is returned.

This is caused by an error in the device filter on DeviceComponentFilterSet: It should be a ModelMultipleChoiceFilter to allow passing multiple values.

This bug affects all device components except for interfaces, as well as inventory items.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Jan 8, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

1 participant