From c0087751dd8e6e4e73da5b619c6762b1702a74e1 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 3 Apr 2023 16:21:57 +0800 Subject: [PATCH] fix(nocodb): commit transaction after reading all deleted records --- .../src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts index 4a76d42304..05038999cc 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts +++ b/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;