From 6d2e7cf7f4c2c4334be68f60a8ce17def7bd0c56 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Wed, 2 Aug 2023 17:51:58 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BB=BB=E5=8A=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E9=A1=B9=20(#11181)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng <1304903146@qq.com> --- apps/accounts/api/automations/backup.py | 4 ++-- apps/accounts/api/automations/base.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/accounts/api/automations/backup.py b/apps/accounts/api/automations/backup.py index 134f9548c..b2d6d7352 100644 --- a/apps/accounts/api/automations/backup.py +++ b/apps/accounts/api/automations/backup.py @@ -26,8 +26,8 @@ class AccountBackupPlanViewSet(OrgBulkModelViewSet): class AccountBackupPlanExecutionViewSet(viewsets.ModelViewSet): serializer_class = serializers.AccountBackupPlanExecutionSerializer - search_fields = ('trigger',) - filterset_fields = ('trigger', 'plan_id') + search_fields = ('trigger', 'plan__name') + filterset_fields = ('trigger', 'plan_id', 'plan__name') http_method_names = ['get', 'post', 'options'] def get_queryset(self): diff --git a/apps/accounts/api/automations/base.py b/apps/accounts/api/automations/base.py index d5e588c04..70ebfd709 100644 --- a/apps/accounts/api/automations/base.py +++ b/apps/accounts/api/automations/base.py @@ -95,8 +95,8 @@ class AutomationExecutionViewSet( mixins.CreateModelMixin, mixins.ListModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet ): - search_fields = ('trigger',) - filterset_fields = ('trigger', 'automation_id') + search_fields = ('trigger', 'automation__name') + filterset_fields = ('trigger', 'automation_id', 'automation__name') serializer_class = serializers.AutomationExecutionSerializer tp: str