From 875f1cf03cc0d1209fa03313ab213bc91b825e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 9 Aug 2023 20:51:47 +0200 Subject: [PATCH] fix(core): fix fetching of EE executions --- packages/cli/src/executions/executions.service.ee.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/executions/executions.service.ee.ts b/packages/cli/src/executions/executions.service.ee.ts index 62657d793b72e..cbd2696d9bfc9 100644 --- a/packages/cli/src/executions/executions.service.ee.ts +++ b/packages/cli/src/executions/executions.service.ee.ts @@ -4,8 +4,6 @@ import { ExecutionsService } from './executions.service'; import type { ExecutionRequest } from '@/requests'; import type { IExecutionResponse, IExecutionFlattedResponse } from '@/Interfaces'; import { EEWorkflowsService as EEWorkflows } from '../workflows/workflows.services.ee'; -import { WorkflowRepository } from '@/databases/repositories'; -import Container from 'typedi'; export class EEExecutionsService extends ExecutionsService { /** @@ -23,7 +21,9 @@ export class EEExecutionsService extends ExecutionsService { if (!execution) return; - const workflow = Container.get(WorkflowRepository).create(execution.workflowData); + const relations = ['shared', 'shared.user', 'shared.role']; + const workflow = await EEWorkflows.get({ id: execution.workflowId }, { relations }); + if (!workflow) return; EEWorkflows.addOwnerAndSharings(workflow); await EEWorkflows.addCredentialsToWorkflow(workflow, req.user);