From ead5ff18422747a9496db323e99798604de986e3 Mon Sep 17 00:00:00 2001 From: "bai.zixv" Date: Thu, 19 Sep 2024 22:23:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(approval):=20=E5=AE=B9=E9=94=99=E5=A4=84?= =?UTF-8?q?=E7=90=86,=E5=AE=A1=E6=89=B9=E6=9D=83=E9=99=90=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=94=99=E8=AF=AF=E5=90=8E,=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=9D=83=E9=99=90=E6=97=B6=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=99=20(#1536)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1536 Reviewed-by: sealday Co-authored-by: bai.zixv Co-committed-by: bai.zixv --- .../src/server/features/approval/actions/approvalRecords.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/actions/approvalRecords.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/actions/approvalRecords.ts index 8e70a3f3b..e0f2a2818 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/actions/approvalRecords.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/actions/approvalRecords.ts @@ -45,9 +45,9 @@ export const approvalRecords = { switch (true) { // case !approvalRecord.workflow.enabled: // return context.throw(400, ERROR_CODE_MAP['not_enable_workflow']); - case approvalRecord.execution.status: + case approvalRecord.execution?.status: return context.throw(400, ERROR_CODE_MAP['execution_finished']); - case approvalRecord.job.status: + case approvalRecord.job?.status: return context.throw(400, ERROR_CODE_MAP['job_finished']); case approvalRecord.status !== APPROVAL_ACTION_STATUS.PENDING: return context.throw(400, ERROR_CODE_MAP['not_approval_pending']);