fix(API): Do not add starting node on workflow creation (#6686)

* fix(API): Do not add starting node on workflow creation

* chore: Remove comment
This commit is contained in:
Iván Ovejero
2023-07-18 14:03:19 +02:00
committed by GitHub
parent 2a6cd26def
commit 92192fbd61
7 changed files with 37 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { CliWorkflowOperationError, SubworkflowOperationError } from 'n8n-workflow';
import type { INode } from 'n8n-workflow';
import { START_NODES } from './constants';
import { STARTING_NODES } from './constants';
/**
* Returns if the given id is a valid workflow id
@@ -19,7 +19,7 @@ function findWorkflowStart(executionMode: 'integrated' | 'cli') {
if (executeWorkflowTriggerNode) return executeWorkflowTriggerNode;
const startNode = nodes.find((node) => START_NODES.includes(node.type));
const startNode = nodes.find((node) => STARTING_NODES.includes(node.type));
if (startNode) return startNode;