mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Delete duplicate code across all commands (#5452)
This commit is contained in:
committed by
GitHub
parent
8494c97821
commit
5194513850
@@ -64,6 +64,7 @@ import { WorkflowRunner } from '@/WorkflowRunner';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { whereClause } from './UserManagement/UserManagementHelper';
|
||||
import { WorkflowsService } from './workflows/workflows.services';
|
||||
import { START_NODES } from './constants';
|
||||
|
||||
const WEBHOOK_PROD_UNREGISTERED_HINT =
|
||||
"The workflow must be active for a production URL to run successfully. You can activate the workflow using the toggle in the top-right of the editor. Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)";
|
||||
@@ -801,10 +802,7 @@ export class ActiveWorkflowRunner {
|
||||
settings: workflowData.settings,
|
||||
});
|
||||
|
||||
const canBeActivated = workflowInstance.checkIfWorkflowCanBeActivated([
|
||||
'n8n-nodes-base.start',
|
||||
'n8n-nodes-base.manualTrigger',
|
||||
]);
|
||||
const canBeActivated = workflowInstance.checkIfWorkflowCanBeActivated(START_NODES);
|
||||
if (!canBeActivated) {
|
||||
Logger.error(`Unable to activate workflow "${workflowData.name}"`);
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user