Browse Source

fix(nocodb): commit transaction after reading all deleted records

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
c0087751dd
  1. 4
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

4
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

@ -2219,12 +2219,12 @@ class BaseModelSqlv2 {
res.push(d);
}
await transaction.commit();
for (const pkValues of deletePkValues) {
deleted.push(await this.readByPk(pkValues));
}
await transaction.commit();
await this.afterBulkDelete(deleted, this.dbDriver, cookie);
return res;

Loading…
Cancel
Save