mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +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,
|
||||
});
|
||||
await WorkflowTaskModel.bulkCreate(
|
||||
tasks.map((item) => ({
|
||||
const records = tasks.map((item) => ({
|
||||
type: MANUAL_TASK_TYPE,
|
||||
key: `${item.id}`,
|
||||
userId: item.userId,
|
||||
workflowId: item.workflowId,
|
||||
})),
|
||||
{
|
||||
}));
|
||||
for (const record of records) {
|
||||
await WorkflowTaskModel.upsert(record, {
|
||||
transaction,
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user