mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-02 02:26:57 +00:00
in batch of 100 to comply with new v2 api restriction
This commit is contained in:
@@ -268,7 +268,15 @@ async function createDemoTable({
|
||||
break;
|
||||
}
|
||||
|
||||
await api.dbTableRow.bulkCreate('noco', context.base.id, table.id, rowAttributes);
|
||||
const BATCH_SIZE = 100;
|
||||
for (let i = 0; i < rowAttributes.length; i += BATCH_SIZE) {
|
||||
await api.dbTableRow.bulkCreate(
|
||||
'noco',
|
||||
context.base.id,
|
||||
table.id,
|
||||
rowAttributes.slice(i * BATCH_SIZE, i * BATCH_SIZE + BATCH_SIZE)
|
||||
);
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user