1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3021: Added tenancy filter to cables

This commit is contained in:
Saria Hajjar
2020-01-10 15:59:56 +00:00
parent fc1245c49d
commit f4514034b8
4 changed files with 37 additions and 3 deletions

View File

@@ -3119,6 +3119,17 @@ class CableFilterForm(BootstrapMixin, forms.Form):
}
)
)
tenant = FilterChoiceField(
queryset=Tenant.objects.all(),
to_field_name='slug',
widget=APISelectMultiple(
api_url="/api/tenancy/tenants/",
value_field='slug',
filter_for={
'device_id': 'tenant',
}
)
)
rack_id = FilterChoiceField(
queryset=Rack.objects.all(),
label='Rack',