Skip to content

Commit 87109f5

Browse files
16315 - Cant filter changelog by object type (no results found) (netbox-community#16324)
* Replaced "api=/api/extras/content-types/" with "/api/extras/object-types/" for JournalEntryFilterForm and ObjectChangeFilterForm. * Addressed PR comment. * Correct feature classifications --------- Co-authored-by: Jeremy Stretch <[email protected]>
1 parent 8ab9afb commit 87109f5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

netbox/extras/forms/filtersets.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,10 @@ class JournalEntryFilterForm(NetBoxModelFilterSetForm):
464464
required=False,
465465
label=_('User')
466466
)
467-
assigned_object_type_id = DynamicModelMultipleChoiceField(
468-
queryset=ObjectType.objects.all(),
467+
assigned_object_type_id = ContentTypeMultipleChoiceField(
468+
queryset=ObjectType.objects.with_feature('journaling'),
469469
required=False,
470470
label=_('Object Type'),
471-
widget=APISelectMultiple(
472-
api_url='/api/extras/content-types/',
473-
)
474471
)
475472
kind = forms.ChoiceField(
476473
label=_('Kind'),
@@ -507,11 +504,8 @@ class ObjectChangeFilterForm(SavedFiltersMixin, FilterForm):
507504
required=False,
508505
label=_('User')
509506
)
510-
changed_object_type_id = DynamicModelMultipleChoiceField(
511-
queryset=ObjectType.objects.all(),
507+
changed_object_type_id = ContentTypeMultipleChoiceField(
508+
queryset=ObjectType.objects.with_feature('change_logging'),
512509
required=False,
513510
label=_('Object Type'),
514-
widget=APISelectMultiple(
515-
api_url='/api/extras/content-types/',
516-
)
517511
)

0 commit comments

Comments
 (0)