mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 21:37:32 -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) => {
|
ResponseHelper.send(async (req: WorkflowRequest.Get) => {
|
||||||
const { id: workflowId } = req.params;
|
const { id: workflowId } = req.params;
|
||||||
|
|
||||||
const workflow = await EEWorkflows.get(
|
const relations = ['shared', 'shared.user', 'shared.role'];
|
||||||
{ id: parseInt(workflowId, 10) },
|
if (!config.getEnv('workflowTagsDisabled')) {
|
||||||
{ relations: ['shared', 'shared.user', 'shared.role'] },
|
relations.push('tags');
|
||||||
);
|
}
|
||||||
|
|
||||||
|
const workflow = await EEWorkflows.get({ id: parseInt(workflowId, 10) }, { relations });
|
||||||
|
|
||||||
if (!workflow) {
|
if (!workflow) {
|
||||||
throw new ResponseHelper.NotFoundError(`Workflow with ID "${workflowId}" does not exist`);
|
throw new ResponseHelper.NotFoundError(`Workflow with ID "${workflowId}" does not exist`);
|
||||||
|
|
Loading…
Reference in a new issue