mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix(plugin-workflow): fix node can not be created when stats is bigint (#7099)
This commit is contained in:
parent
0cbcd03390
commit
aa1070ad0f
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user