From 57859afe72d38c99908c70047da5290d827af1b9 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Fri, 11 Oct 2024 16:17:49 +0000 Subject: [PATCH] fix: bulkUpdate missing transacting call --- packages/nocodb/src/db/BaseModelSqlv2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index 809d721d6a..de66da4003 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -5710,8 +5710,6 @@ class BaseModelSqlv2 { } } - transaction = trx ?? (await this.dbDriver.transaction()); - const updateDatas = raw ? datas : await Promise.all( @@ -5811,6 +5809,8 @@ class BaseModelSqlv2 { } } + transaction = trx ?? (await this.dbDriver.transaction()); + for (const o of toBeUpdated) { await transaction(this.tnPath).update(o.d).where(o.wherePk); }