Skip to content

Commit

Permalink
fix: 个别页面搜索不生效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
w940853815 authored and BaiJiangJie committed Mar 5, 2024
1 parent 786cb23 commit 40730b7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/accounts/api/automations/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

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

Expand Down
4 changes: 2 additions & 2 deletions apps/accounts/api/automations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
class AutomationAssetsListApi(generics.ListAPIView):
model = BaseAutomation
serializer_class = serializers.AutomationAssetsSerializer
filter_fields = ("name", "address")
search_fields = filter_fields
filterset_fields = ("name", "address")
search_fields = filterset_fields

def get_object(self):
pk = self.kwargs.get('pk')
Expand Down
4 changes: 2 additions & 2 deletions apps/accounts/api/automations/change_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

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


Expand Down
4 changes: 2 additions & 2 deletions apps/accounts/api/automations/gather_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

class GatherAccountsAutomationViewSet(OrgBulkModelViewSet):
model = GatherAccountsAutomation
filter_fields = ('name',)
search_fields = filter_fields
filterset_fields = ('name',)
search_fields = filterset_fields
serializer_class = serializers.GatherAccountAutomationSerializer


Expand Down
4 changes: 2 additions & 2 deletions apps/accounts/api/automations/push_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

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


Expand Down

0 comments on commit 40730b7

Please sign in to comment.