mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
⚡ Display an error when unsaved workflow gets executed with webhook
This commit is contained in:
@@ -512,11 +512,8 @@ class App {
|
||||
|
||||
const sessionId = GenericHelpers.getSessionId(req);
|
||||
|
||||
// Check if workflow is saved as webhooks can only be tested with saved workflows.
|
||||
// If that is the case check if any webhooks calls are present we have to wait for and
|
||||
// if that is the case wait till we receive it.
|
||||
if (WorkflowHelpers.isWorkflowIdValid(workflowData.id) === true && (runData === undefined || startNodes === undefined || startNodes.length === 0 || destinationNode === undefined)) {
|
||||
// Webhooks can only be tested with saved workflows
|
||||
// If webhooks nodes exist and are active we have to wait for till we receive a call
|
||||
if (runData === undefined || startNodes === undefined || startNodes.length === 0 || destinationNode === undefined) {
|
||||
const credentials = await WorkflowCredentials(workflowData.nodes);
|
||||
const additionalData = await WorkflowExecuteAdditionalData.getBase(credentials);
|
||||
const nodeTypes = NodeTypes();
|
||||
|
||||
Reference in New Issue
Block a user