Skip to content

The open alternative to Salesforce, designed for AI.

Remove status check when ending workflow (#10299)

Thomas Trompetted628958905bc
diff --git a/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run.workspace-service.ts b/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run.workspace-service.ts
index f1eb0791cd4..0845db6bec0 100644
--- a/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run.workspace-service.ts
+++ b/packages/twenty-server/src/modules/workflow/workflow-runner/workflow-run/workflow-run.workspace-service.ts
@@ -113,13 +113,6 @@ export class WorkflowRunWorkspaceService {
);
}
- if (workflowRunToUpdate.status !== WorkflowRunStatus.RUNNING) {
- throw new WorkflowRunException(
- 'Workflow cannot be ended as it is not running',
- WorkflowRunExceptionCode.INVALID_OPERATION,
- );
- }
-
return workflowRunRepository.update(workflowRunToUpdate.id, {
status,
endedAt: new Date().toISOString(),