From c7c379479f6dd5556ad31086b156a1aa85dc18cd Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Tue, 5 Mar 2024 10:47:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=AA=E5=88=AB=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/accounts/api/automations/backup.py | 4 ++-- apps/accounts/api/automations/change_secret.py | 4 ++-- apps/accounts/api/automations/gather_accounts.py | 4 ++-- apps/accounts/api/automations/push_account.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/accounts/api/automations/backup.py b/apps/accounts/api/automations/backup.py index b2d6d7352..d7648e8cc 100644 --- a/apps/accounts/api/automations/backup.py +++ b/apps/accounts/api/automations/backup.py @@ -18,8 +18,8 @@ __all__ = [ class AccountBackupPlanViewSet(OrgBulkModelViewSet): model = AccountBackupAutomation - filter_fields = ('name',) - search_fields = filter_fields + filterset_fields = ('name',) + search_fields = filterset_fields ordering = ('name',) serializer_class = serializers.AccountBackupSerializer diff --git a/apps/accounts/api/automations/change_secret.py b/apps/accounts/api/automations/change_secret.py index f1c522fc4..32fea5d16 100644 --- a/apps/accounts/api/automations/change_secret.py +++ b/apps/accounts/api/automations/change_secret.py @@ -24,8 +24,8 @@ __all__ = [ class ChangeSecretAutomationViewSet(OrgBulkModelViewSet): model = ChangeSecretAutomation - filter_fields = ('name', 'secret_type', 'secret_strategy') - search_fields = filter_fields + filterset_fields = ('name', 'secret_type', 'secret_strategy') + search_fields = filterset_fields serializer_class = serializers.ChangeSecretAutomationSerializer diff --git a/apps/accounts/api/automations/gather_accounts.py b/apps/accounts/api/automations/gather_accounts.py index e6a846368..e125ed96b 100644 --- a/apps/accounts/api/automations/gather_accounts.py +++ b/apps/accounts/api/automations/gather_accounts.py @@ -20,8 +20,8 @@ __all__ = [ class GatherAccountsAutomationViewSet(OrgBulkModelViewSet): model = GatherAccountsAutomation - filter_fields = ('name',) - search_fields = filter_fields + filterset_fields = ('name',) + search_fields = filterset_fields serializer_class = serializers.GatherAccountAutomationSerializer diff --git a/apps/accounts/api/automations/push_account.py b/apps/accounts/api/automations/push_account.py index e8832815b..1fa5c1219 100644 --- a/apps/accounts/api/automations/push_account.py +++ b/apps/accounts/api/automations/push_account.py @@ -20,8 +20,8 @@ __all__ = [ class PushAccountAutomationViewSet(OrgBulkModelViewSet): model = PushAccountAutomation - filter_fields = ('name', 'secret_type', 'secret_strategy') - search_fields = filter_fields + filterset_fields = ('name', 'secret_type', 'secret_strategy') + search_fields = filterset_fields serializer_class = serializers.PushAccountAutomationSerializer