Fixes #3862: Allow filtering device components by multiple device names

This commit is contained in:
Jeremy Stretch
2020-01-08 11:12:44 -05:00
parent 7357b1c7e5
commit 94af70d2d1
2 changed files with 3 additions and 1 deletions

View File

@@ -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)',