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

#13426: Employ proper feature keys for image attachment & contact filter forms

Jeremy Stretch 2 лет назад
Родитель
Сommit
16bcb1dbb0
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      netbox/extras/forms/filtersets.py
  2. 1 1
      netbox/tenancy/forms/filtersets.py

+ 1 - 1
netbox/extras/forms/filtersets.py

@@ -180,7 +180,7 @@ class ImageAttachmentFilterForm(SavedFiltersMixin, FilterForm):
     )
     )
     content_type_id = ContentTypeChoiceField(
     content_type_id = ContentTypeChoiceField(
         label=_('Content type'),
         label=_('Content type'),
-        queryset=ContentType.objects.filter(FeatureQuery('custom_fields').get_query()),
+        queryset=ContentType.objects.filter(FeatureQuery('image_attachments').get_query()),
         required=False
         required=False
     )
     )
     name = forms.CharField(
     name = forms.CharField(

+ 1 - 1
netbox/tenancy/forms/filtersets.py

@@ -88,7 +88,7 @@ class ContactAssignmentFilterForm(NetBoxModelFilterSetForm):
     )
     )
     content_type_id = ContentTypeMultipleChoiceField(
     content_type_id = ContentTypeMultipleChoiceField(
         queryset=ContentType.objects.all(),
         queryset=ContentType.objects.all(),
-        limit_choices_to=FeatureQuery('custom_fields'),
+        limit_choices_to=FeatureQuery('contacts'),
         required=False,
         required=False,
         label=_('Object type')
         label=_('Object type')
     )
     )