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

Standardize usage of FilterChoiceField

This commit is contained in:
Jeremy Stretch
2020-02-10 09:58:33 -05:00
parent 5ddfde2214
commit 55f5ede970
4 changed files with 8 additions and 6 deletions

View File

@ -387,11 +387,14 @@ class ObjectChangeFilterForm(BootstrapMixin, forms.Form):
)
action = forms.ChoiceField(
choices=add_blank_choice(ObjectChangeActionChoices),
required=False
required=False,
widget=StaticSelect2()
)
# TODO: Convert to FilterChoiceField once we have an API endpoint for users
user = forms.ModelChoiceField(
queryset=User.objects.order_by('username'),
required=False
required=False,
widget=StaticSelect2()
)
changed_object_type = forms.ModelChoiceField(
queryset=ContentType.objects.order_by('model'),