refactor(core): Enable interim updates check (#4582)

*  Enable interim updates check

*  Set default value

*  Undo default value, keep as sentinel

* 🧪 Unskip tests
This commit is contained in:
Iván Ovejero
2022-11-14 15:38:19 +01:00
committed by GitHub
parent 0148631d28
commit e7316c588f
2 changed files with 8 additions and 8 deletions

View File

@@ -196,13 +196,13 @@ export class WorkflowsService {
);
}
// if (!forceSave && workflow.hash !== shared.workflow.hash) {
// throw new ResponseHelper.ResponseError(
// `Workflow ID ${workflowId} cannot be saved because it was changed by another user.`,
// undefined,
// 400,
// );
// }
if (!forceSave && workflow.hash !== '' && workflow.hash !== shared.workflow.hash) {
throw new ResponseHelper.ResponseError(
`Workflow ID ${workflowId} cannot be saved because it was changed by another user.`,
undefined,
400,
);
}
// check credentials for old format
await WorkflowHelpers.replaceInvalidCredentials(workflow);