Check workflow version is valid before publishing (#6702)

Fix https://github.com/twentyhq/twenty/issues/6670
This commit is contained in:
Thomas Trompette
2024-08-21 17:56:33 +02:00
committed by GitHub
parent 663acd56e4
commit be50a6256f
4 changed files with 73 additions and 11 deletions

View File

@ -35,7 +35,7 @@ export class WorkflowCommonWorkspaceService {
);
}
if (!workflowVersion.trigger || !workflowVersion.trigger?.type) {
if (!workflowVersion.trigger) {
throw new WorkflowTriggerException(
'Workflow version does not contains trigger',
WorkflowTriggerExceptionCode.INVALID_WORKFLOW_VERSION,