fix(core): Fix workflow activation with history and workflow history for EE (no-changelog) (#7508)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Val
2023-10-25 11:07:11 +01:00
committed by GitHub
parent 671c95760b
commit 93cfabbeac
8 changed files with 361 additions and 34 deletions

View File

@@ -26,7 +26,6 @@ import { RoleService } from '@/services/role.service';
import * as utils from '@/utils';
import { listQueryMiddleware } from '@/middlewares';
import { TagService } from '@/services/tag.service';
import { isWorkflowHistoryLicensed } from './workflowHistory/workflowHistoryHelper.ee';
import { WorkflowHistoryService } from './workflowHistory/workflowHistory.service.ee';
export const workflowsController = express.Router();
@@ -101,13 +100,11 @@ workflowsController.post(
throw new ResponseHelper.InternalServerError('Failed to save workflow');
}
if (isWorkflowHistoryLicensed()) {
await Container.get(WorkflowHistoryService).saveVersion(
req.user,
savedWorkflow,
savedWorkflow.id,
);
}
await Container.get(WorkflowHistoryService).saveVersion(
req.user,
savedWorkflow,
savedWorkflow.id,
);
if (tagIds && !config.getEnv('workflowTagsDisabled') && savedWorkflow.tags) {
savedWorkflow.tags = Container.get(TagService).sortByRequestOrder(savedWorkflow.tags, {