From 30dfef6625c5d8e54f5ad8c87d980ae2d9e8d6c8 Mon Sep 17 00:00:00 2001 From: nothing Date: Sat, 11 Mar 2023 13:45:46 +0800 Subject: [PATCH] task.js(fix): "history" is not defined --- app/service/task.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/service/task.js b/app/service/task.js index dbfe440..c3138f5 100644 --- a/app/service/task.js +++ b/app/service/task.js @@ -379,6 +379,8 @@ class TaskService extends Service { } delete history.taskEditedUserList; await trx('task_history', this.ctx).insert(history); + + return history; } async saveWorkFlowExecHistory(trx, taskInfo, currentNode, endNode, line, nextLineList, taskEditUserList, history) { @@ -430,7 +432,7 @@ class TaskService extends Service { const currentNode = nodeList.find(e => e.id === taskInfo.taskConfigId); taskFormInput = taskFormInput || taskInfo.taskFormInput; - await this.saveCurrentNodeExecHistory(trx, taskInfo, currentNode, taskFormInput, taskComment, lines, type); + const history = await this.saveCurrentNodeExecHistory(trx, taskInfo, currentNode, taskFormInput, taskComment, lines, type); // 未配置连线时,默认添加拒绝连线到end节点 if (endNode && !lines.length) {