Skip to content

Commit

Permalink
fix: Restore missing tags in workflow retrieve (#5004)
Browse files Browse the repository at this point in the history
  • Loading branch information
krynble authored Dec 22, 2022
1 parent 0a416ee commit 87d8865
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/cli/src/workflows/workflows.controller.ee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ EEWorkflowController.get(
ResponseHelper.send(async (req: WorkflowRequest.Get) => {
const { id: workflowId } = req.params;

const workflow = await EEWorkflows.get(
{ id: parseInt(workflowId, 10) },
{ relations: ['shared', 'shared.user', 'shared.role'] },
);
const relations = ['shared', 'shared.user', 'shared.role'];
if (!config.getEnv('workflowTagsDisabled')) {
relations.push('tags');
}

const workflow = await EEWorkflows.get({ id: parseInt(workflowId, 10) }, { relations });

if (!workflow) {
throw new ResponseHelper.NotFoundError(`Workflow with ID "${workflowId}" does not exist`);
Expand Down

0 comments on commit 87d8865

Please sign in to comment.