mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-24 10:22:07 +01:00
Merge pull request #3887 from hSaria/3021-cable-tenant-filter
Fixes #3021: Added tenancy filter for cables
This commit is contained in:
@@ -3122,6 +3122,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',
|
||||
|
||||
Reference in New Issue
Block a user