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

VirtualMachine filter form does not properly filter Roles on VM Role attribute #3014

Closed
Grokzen opened this issue Mar 18, 2019 · 0 comments · Fixed by #3015
Closed

VirtualMachine filter form does not properly filter Roles on VM Role attribute #3014

Grokzen opened this issue Mar 18, 2019 · 0 comments · Fixed by #3015
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@Grokzen
Copy link
Contributor

Grokzen commented Mar 18, 2019

Environment

  • Python version: 3.6.x
  • NetBox version: 2.5.8

Steps to Reproduce

  1. Create 2 DeviceRoles and set one to be a VM Role = True and one to VM Role = False
  2. Go to VirtualMachine list view and look in the filter box for Role.

Expected Behavior

Only one role should be visible as there is filtering for vm_role=True in the queryset.

Observed Behavior

Both DeviceRoles is visible in the dropdown menu.

Solution

Change "vm_role": "true" to "vm_role": "True" at the following three locations.

VirtualMachineForm :
https://github.com/digitalocean/netbox/blob/develop/netbox/virtualization/forms.py#L351

VirtualMachineFilterForm :
https://github.com/digitalocean/netbox/blob/develop/netbox/virtualization/forms.py#L585

VirtualMachineBullkEditForm :
https://github.com/digitalocean/netbox/blob/develop/netbox/virtualization/forms.py#L483

@DanSheps DanSheps added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Mar 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 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

Successfully merging a pull request may close this issue.

2 participants