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

Move null_option to DynamicModelChoiceMixin

This commit is contained in:
Jeremy Stretch
2020-08-12 09:47:13 -04:00
parent f3fb85933f
commit 8a8b4e728a
7 changed files with 42 additions and 86 deletions

View File

@ -106,9 +106,7 @@ class TenantFilterForm(BootstrapMixin, CustomFieldFilterForm):
queryset=TenantGroup.objects.all(),
to_field_name='slug',
required=False,
widget=APISelectMultiple(
null_option=True,
)
null_option='None'
)
tag = TagFilterField(model)
@ -152,8 +150,8 @@ class TenancyFilterForm(forms.Form):
queryset=TenantGroup.objects.all(),
to_field_name='slug',
required=False,
null_option='None',
widget=APISelectMultiple(
null_option=True,
filter_for={
'tenant': 'group'
}
@ -163,7 +161,5 @@ class TenancyFilterForm(forms.Form):
queryset=Tenant.objects.all(),
to_field_name='slug',
required=False,
widget=APISelectMultiple(
null_option=True,
)
null_option='None'
)