From 4711b4d5290f822ea33b668bc151181b2b085e6f Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 18 Jan 2022 15:17:05 -0500 Subject: [PATCH] Correct FeatureQuery invocations --- netbox/extras/forms/bulk_edit.py | 4 ++-- netbox/extras/forms/filtersets.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/netbox/extras/forms/bulk_edit.py b/netbox/extras/forms/bulk_edit.py index 1b87256a5..45b48e9a2 100644 --- a/netbox/extras/forms/bulk_edit.py +++ b/netbox/extras/forms/bulk_edit.py @@ -44,7 +44,7 @@ class CustomLinkBulkEditForm(BulkEditForm): ) content_type = ContentTypeChoiceField( queryset=ContentType.objects.all(), - limit_choices_to=FeatureQuery('custom_fields'), + limit_choices_to=FeatureQuery('custom_links'), required=False ) new_window = forms.NullBooleanField( @@ -71,7 +71,7 @@ class ExportTemplateBulkEditForm(BulkEditForm): ) content_type = ContentTypeChoiceField( queryset=ContentType.objects.all(), - limit_choices_to=FeatureQuery('custom_fields'), + limit_choices_to=FeatureQuery('export_templates'), required=False ) description = forms.CharField( diff --git a/netbox/extras/forms/filtersets.py b/netbox/extras/forms/filtersets.py index 03cd170b8..3848dcb0d 100644 --- a/netbox/extras/forms/filtersets.py +++ b/netbox/extras/forms/filtersets.py @@ -62,7 +62,7 @@ class CustomLinkFilterForm(FilterForm): ] content_type = ContentTypeChoiceField( queryset=ContentType.objects.all(), - limit_choices_to=FeatureQuery('custom_fields'), + limit_choices_to=FeatureQuery('custom_links'), required=False ) weight = forms.IntegerField( @@ -83,7 +83,7 @@ class ExportTemplateFilterForm(FilterForm): ] content_type = ContentTypeChoiceField( queryset=ContentType.objects.all(), - limit_choices_to=FeatureQuery('custom_fields'), + limit_choices_to=FeatureQuery('export_templates'), required=False ) mime_type = forms.CharField( @@ -109,7 +109,7 @@ class WebhookFilterForm(FilterForm): ] content_types = ContentTypeMultipleChoiceField( queryset=ContentType.objects.all(), - limit_choices_to=FeatureQuery('custom_fields'), + limit_choices_to=FeatureQuery('webhooks'), required=False ) http_method = forms.MultipleChoiceField(