mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fix filtering for platforms, tenant groups
This commit is contained in:
@@ -62,6 +62,15 @@ class TenantGroupBulkEditForm(BootstrapMixin, CustomFieldModelBulkEditForm):
|
||||
nullable_fields = ['parent', 'description']
|
||||
|
||||
|
||||
class TenantGroupFilterForm(BootstrapMixin, CustomFieldModelFilterForm):
|
||||
model = TenantGroup
|
||||
parent_id = DynamicModelMultipleChoiceField(
|
||||
queryset=TenantGroup.objects.all(),
|
||||
required=False,
|
||||
label=_('Parent group')
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# Tenants
|
||||
#
|
||||
|
@@ -20,6 +20,8 @@ class TenantGroupListView(generic.ObjectListView):
|
||||
'tenant_count',
|
||||
cumulative=True
|
||||
)
|
||||
filterset = filtersets.TenantGroupFilterSet
|
||||
filterset_form = forms.TenantGroupFilterForm
|
||||
table = tables.TenantGroupTable
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user