From 3afc7a3debccefa6b11ecee2f22fe4eea72410e1 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Wed, 21 Oct 2020 10:26:15 +0200 Subject: [PATCH] :bug: Fix issue that none active workflow got displayed as active --- packages/cli/src/ActiveWorkflowRunner.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ActiveWorkflowRunner.ts b/packages/cli/src/ActiveWorkflowRunner.ts index e8964f10e6..8162689f94 100644 --- a/packages/cli/src/ActiveWorkflowRunner.ts +++ b/packages/cli/src/ActiveWorkflowRunner.ts @@ -181,8 +181,9 @@ export class ActiveWorkflowRunner { * @returns {string[]} * @memberof ActiveWorkflowRunner */ - getActiveWorkflows(): Promise { - return Db.collections.Workflow?.find({ where: { active: true }, select: ['id'] }) as Promise; + async getActiveWorkflows(): Promise { + const activeWorkflows = await Db.collections.Workflow?.find({ where: { active: true }, select: ['id'] }) as IWorkflowDb[]; + return activeWorkflows.filter(workflow => this.activationErrors[workflow.id.toString()] === undefined); }