Skip to content

Commit

Permalink
fix(core): Fix fetching of EE executions (n8n-io#6901)
Browse files Browse the repository at this point in the history
fix(core): fix fetching of EE executions
  • Loading branch information
netroy authored Aug 10, 2023
1 parent e6e6216 commit f3fce48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/src/executions/executions.service.ee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand All @@ -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);
Expand Down

0 comments on commit f3fce48

Please sign in to comment.