Skip to content

Commit

Permalink
Fixes #1585: Fixed slug-based filtering of virtual machines
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Oct 13, 2017
1 parent 023ff68 commit 60b4f1f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions netbox/virtualization/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class VirtualMachineFilter(CustomFieldFilterSet):
label='Cluster group (ID)',
)
cluster_group = NullableModelMultipleChoiceFilter(
name='cluster__group__slug',
name='cluster__group',
queryset=ClusterGroup.objects.all(),
to_field_name='slug',
label='Cluster group (slug)',
Expand All @@ -88,12 +88,10 @@ class VirtualMachineFilter(CustomFieldFilterSet):
label='Cluster (ID)',
)
role_id = NullableModelMultipleChoiceFilter(
name='role_id',
queryset=DeviceRole.objects.all(),
label='Role (ID)',
)
role = NullableModelMultipleChoiceFilter(
name='role__slug',
queryset=DeviceRole.objects.all(),
to_field_name='slug',
label='Role (slug)',
Expand All @@ -112,7 +110,6 @@ class VirtualMachineFilter(CustomFieldFilterSet):
label='Platform (ID)',
)
platform = NullableModelMultipleChoiceFilter(
name='platform',
queryset=Platform.objects.all(),
to_field_name='slug',
label='Platform (slug)',
Expand Down

0 comments on commit 60b4f1f

Please sign in to comment.