Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-06-19 08:40:41 +00:00
commit 2ff9b8a60b

View File

@ -20,8 +20,7 @@ export async function create(context: Context, next) {
context.body = await db.sequelize.transaction(async (transaction) => {
const workflow = (await repository.getSourceModel(transaction)) as WorkflowModel;
workflow.versionStats = await workflow.getVersionStats({ transaction });
const { executed } = workflow.versionStats;
if (executed) {
if (workflow.versionStats.executed > 0) {
context.throw(400, 'Node could not be created in executed workflow');
}