Просмотр исходного кода

Merge branch 'develop' into 3857-group-custom-link

hSaria 6 лет назад
Родитель
Сommit
8519f546a6
2 измененных файлов с 3 добавлено и 1 удалено
  1. 1 0
      docs/release-notes/version-2.6.md
  2. 2 1
      netbox/dcim/filters.py

+ 1 - 0
docs/release-notes/version-2.6.md

@@ -11,6 +11,7 @@
 * [#3853](https://github.com/netbox-community/netbox/issues/3853) - Fix device role link on config context view
 * [#3856](https://github.com/netbox-community/netbox/issues/3856) - Allow filtering VM interfaces by multiple MAC addresses
 * [#3857](https://github.com/netbox-community/netbox/issues/3857) - Fix group custom links rendering
+* [#3862](https://github.com/netbox-community/netbox/issues/3862) - Allow filtering device components by multiple device names
 
 ---
 

+ 2 - 1
netbox/dcim/filters.py

@@ -646,7 +646,8 @@ class DeviceComponentFilterSet(django_filters.FilterSet):
         queryset=Device.objects.all(),
         label='Device (ID)',
     )
-    device = django_filters.ModelChoiceFilter(
+    device = django_filters.ModelMultipleChoiceFilter(
+        field_name='device__name',
         queryset=Device.objects.all(),
         to_field_name='name',
         label='Device (name)',