Browse Source

fix: bulkupsert endpoint

pull/9913/head
DarkPhoenix2704 3 days ago
parent
commit
c04acbfe76
  1. 7
      packages/nocodb/src/db/BaseModelSqlv2.ts

7
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -5332,10 +5332,6 @@ class BaseModelSqlv2 {
const dataWithoutPks = [];
for (const data of preparedDatas) {
if (!raw) {
await this.prepareNocoData(data, true, cookie);
}
const pkValues = this.extractPksValues(data);
if (pkValues !== 'N/A' && pkValues !== undefined) {
dataWithPks.push({ pk: pkValues, data });
@ -5366,6 +5362,9 @@ class BaseModelSqlv2 {
}
}
await Promise.all(toInsert.map((d) => this.prepareNocoData(d, true, cookie)))
await Promise.all(toUpdate.map((d) => this.prepareNocoData(d, false, cookie)))
trx = await this.dbDriver.transaction();
const updatedPks = [];

Loading…
Cancel
Save