mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix(plugin-workflow-manual): fix task migration (#6407)
This commit is contained in:
parent
ded7b983fb
commit
6d929de82e
@ -26,17 +26,17 @@ export default class extends Migration {
|
|||||||
},
|
},
|
||||||
transaction,
|
transaction,
|
||||||
});
|
});
|
||||||
await WorkflowTaskModel.bulkCreate(
|
const records = tasks.map((item) => ({
|
||||||
tasks.map((item) => ({
|
type: MANUAL_TASK_TYPE,
|
||||||
type: MANUAL_TASK_TYPE,
|
key: `${item.id}`,
|
||||||
key: `${item.id}`,
|
userId: item.userId,
|
||||||
userId: item.userId,
|
workflowId: item.workflowId,
|
||||||
workflowId: item.workflowId,
|
}));
|
||||||
})),
|
for (const record of records) {
|
||||||
{
|
await WorkflowTaskModel.upsert(record, {
|
||||||
transaction,
|
transaction,
|
||||||
},
|
});
|
||||||
);
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user