fix(core): Fix fetching of EE executions (#6901)

fix(core): fix fetching of EE executions
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-08-10 10:38:22 +02:00 committed by GitHub
parent e6e6216b5d
commit f3fce48155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);