Просмотр исходного кода

Correct FeatureQuery invocations

jeremystretch 4 лет назад
Родитель
Сommit
4711b4d529
2 измененных файлов с 5 добавлено и 5 удалено
  1. 2 2
      netbox/extras/forms/bulk_edit.py
  2. 3 3
      netbox/extras/forms/filtersets.py

+ 2 - 2
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(

+ 3 - 3
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(