perf: change secret push record list

This commit is contained in:
feng
2025-03-13 14:57:05 +08:00
committed by feng626
parent 9e4b82bf45
commit 15919085bc
4 changed files with 35 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ from accounts.models import PushAccountAutomation, PushSecretRecord
from orgs.mixins.api import OrgBulkModelViewSet, OrgGenericViewSet
from .base import (
AutomationAssetsListApi, AutomationRemoveAssetApi, AutomationAddAssetApi,
AutomationNodeAddRemoveApi, AutomationExecutionViewSet
AutomationNodeAddRemoveApi, AutomationExecutionViewSet, RecordListMixin
)
__all__ = [
@@ -42,7 +42,7 @@ class PushAccountExecutionViewSet(AutomationExecutionViewSet):
return queryset
class PushAccountRecordViewSet(mixins.ListModelMixin, OrgGenericViewSet):
class PushAccountRecordViewSet(RecordListMixin, mixins.ListModelMixin, OrgGenericViewSet):
filterset_class = PushAccountRecordFilterSet
search_fields = ('asset__address', 'account__username')
ordering_fields = ('date_finished',)