From 5098f0db7a4f0a0bc9728ddd9b0e4a941ecd90d2 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Fri, 11 Oct 2024 16:17:48 +0000 Subject: [PATCH] fix: oss bulk update missing transaction calls --- packages/nocodb/src/db/BaseModelSqlv2.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index e283aff1c4..0b7c6e7bab 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -5699,7 +5699,7 @@ class BaseModelSqlv2 { trx?: any; } = {}, ) { - const transaction = trx ?? (await this.dbDriver.transaction()); + let transaction; try { const columns = await this.model.getColumns(this.context); @@ -5710,6 +5710,8 @@ class BaseModelSqlv2 { } } + transaction = trx ?? (await this.dbDriver.transaction()); + const updateDatas = raw ? datas : await Promise.all(