Skip to content

Commit

Permalink
Fixes #5639: Fix filtering connection lists by device name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Jan 19, 2021
1 parent a0e82e1 commit 3c9be8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/release-notes/version-2.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [#5574](https://github.com/netbox-community/netbox/issues/5574) - Restrict the creation of device bay templates on non-parent device types
* [#5584](https://github.com/netbox-community/netbox/issues/5584) - Restore power utilization panel under device view
* [#5597](https://github.com/netbox-community/netbox/issues/5597) - Fix ordering devices by primary IP address
* [#5639](https://github.com/netbox-community/netbox/issues/5639) - Fix filtering connection lists by device name

---

Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ def filter_site(self, queryset, name, value):
def filter_device(self, queryset, name, value):
if not value:
return queryset
return queryset.filter(device_id__in=value)
return queryset.filter(**{f'{name}__in': value})


class ConsoleConnectionFilterSet(ConnectionFilterSet, BaseFilterSet):
Expand Down

0 comments on commit 3c9be8c

Please sign in to comment.