fix: 作业管理资产根据标签过滤获取不对

pull/12728/head^2
wangruidong 2024-02-28 15:51:08 +08:00 committed by Bryan
parent 8ebc99339b
commit 457d2b2359
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ from rest_framework.generics import ListAPIView, RetrieveAPIView
from assets.api.asset.asset import AssetFilterSet
from assets.models import Asset, Node
from common.api.mixin import ExtraFilterFieldsMixin
from common.utils import get_logger, lazyproperty, is_uuid
from orgs.utils import tmp_to_root_org
from perms import serializers
@ -38,7 +39,7 @@ class UserPermedAssetRetrieveApi(SelfOrPKUserMixin, RetrieveAPIView):
return asset
class BaseUserPermedAssetsApi(SelfOrPKUserMixin, ListAPIView):
class BaseUserPermedAssetsApi(SelfOrPKUserMixin, ExtraFilterFieldsMixin, ListAPIView):
ordering = []
search_fields = ('name', 'address', 'comment')
ordering_fields = ("name", "address")