mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +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) => {
|
context.body = await db.sequelize.transaction(async (transaction) => {
|
||||||
const workflow = (await repository.getSourceModel(transaction)) as WorkflowModel;
|
const workflow = (await repository.getSourceModel(transaction)) as WorkflowModel;
|
||||||
workflow.versionStats = await workflow.getVersionStats({ transaction });
|
workflow.versionStats = await workflow.getVersionStats({ transaction });
|
||||||
const { executed } = workflow.versionStats;
|
if (workflow.versionStats.executed > 0) {
|
||||||
if (executed) {
|
|
||||||
context.throw(400, 'Node could not be created in executed workflow');
|
context.throw(400, 'Node could not be created in executed workflow');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user