mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
fix: Restore missing tags in workflow retrieve (#5004)
This commit is contained in:
parent
0a416eebea
commit
87d8865ad3
|
@ -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`);
|
||||
|
|
Loading…
Reference in a new issue