Remove automated trigger update (#15663)
Automated triggers are duplicated on version update.
This commit is contained in:
+16
-2
@@ -67,14 +67,28 @@ export class WorkflowCommonWorkspaceService {
|
||||
},
|
||||
});
|
||||
|
||||
return this.getValidWorkflowVersionOrFail(workflowVersion);
|
||||
}
|
||||
|
||||
async getValidWorkflowVersionOrFail(
|
||||
workflowVersion: WorkflowVersionWorkspaceEntity | null,
|
||||
): Promise<WorkflowVersionWorkspaceEntity> {
|
||||
if (!workflowVersion) {
|
||||
throw new WorkflowTriggerException(
|
||||
'Workflow version not found',
|
||||
WorkflowTriggerExceptionCode.NOT_FOUND,
|
||||
WorkflowTriggerExceptionCode.INVALID_INPUT,
|
||||
);
|
||||
}
|
||||
|
||||
return workflowVersion;
|
||||
// FIXME: For now we will make the trigger optional. Later, we'll have to ensure the trigger is defined when publishing the flow.
|
||||
// if (!workflowVersion.trigger) {
|
||||
// throw new WorkflowTriggerException(
|
||||
// 'Workflow version does not contains trigger',
|
||||
// WorkflowTriggerExceptionCode.INVALID_WORKFLOW_VERSION,
|
||||
// );
|
||||
// }
|
||||
|
||||
return { ...workflowVersion, trigger: workflowVersion.trigger };
|
||||
}
|
||||
|
||||
async getObjectMetadataMaps(
|
||||
|
||||
Reference in New Issue
Block a user