mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Resolves response promise for active execution on job finished in queue mode (#15643)
Co-authored-by: Jaakko Husso <jaakko@n8n.io>
This commit is contained in:
committed by
GitHub
parent
92cf3cedbb
commit
7cd7883b34
@@ -105,6 +105,7 @@ export function getWorkflowWebhooks(
|
||||
return returnData;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
export function autoDetectResponseMode(
|
||||
workflowStartNode: INode,
|
||||
workflow: Workflow,
|
||||
@@ -126,6 +127,21 @@ export function autoDetectResponseMode(
|
||||
}
|
||||
}
|
||||
|
||||
// If there are form nodes connected to a current form node we're dealing with a multipage form
|
||||
// and we need to return the formPage response mode when a second page of the form gets submitted
|
||||
// to be able to show potential form errors correctly.
|
||||
if (workflowStartNode.type === FORM_NODE_TYPE && method === 'POST') {
|
||||
const connectedNodes = workflow.getChildNodes(workflowStartNode.name);
|
||||
|
||||
for (const nodeName of connectedNodes) {
|
||||
const node = workflow.nodes[nodeName];
|
||||
|
||||
if (node.type === FORM_NODE_TYPE && !node.disabled) {
|
||||
return 'formPage';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (workflowStartNode.type === WAIT_NODE_TYPE && workflowStartNode.parameters.resume !== 'form') {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user