From 0099b0b28049562f7b6ae866ac9001f7a1e9269b Mon Sep 17 00:00:00 2001 From: Junyi Date: Thu, 12 Oct 2023 18:12:15 +0800 Subject: [PATCH] fix(plugin-workflow): ignore queuing executions which workflow has been deleted (#2808) --- .../plugins/@nocobase/plugin-workflow/src/server/Plugin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts index 64bebb7ac..ab29eaa4c 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/Plugin.ts @@ -328,6 +328,9 @@ export default class WorkflowPlugin extends Plugin { const execution = (await this.db.getRepository('executions').findOne({ filter: { status: EXECUTION_STATUS.QUEUEING, + 'workflow.id': { + [Op.not]: null, + }, }, appends: ['workflow'], sort: 'createdAt',