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

@@ -122,3 +122,12 @@ class AutomationExecutionViewSet(
execution = self.get_object()
report = execution.manager.gen_report()
return HttpResponse(report)
class RecordListMixin:
def list(self, request, *args, **kwargs):
try:
response = super().list(request, *args, **kwargs)
except Exception as e:
response = Response({'detail': str(e)}, status=status.HTTP_400_BAD_REQUEST)
return response