From 04ef1b8e71990a67983a5aea27870d21a2f7dc11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AF=97=E4=BA=BA=E7=9A=84=E5=92=B8=E9=B1=BC?= Date: Thu, 8 Dec 2022 00:51:37 +0800 Subject: [PATCH] fix: change conditions --- .../src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts | 5 +++-- 1 file changed, 3 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 ee0a73bf84..825b05c268 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 @@ -1992,10 +1992,11 @@ class BaseModelSqlv2 { const res = []; for (const d of ids) { - if (Object.keys(d).length) { + const data = await this.model.mapAliasToColumn(d); + if (Object.keys(data).length) { const response = await transaction(this.model.table_name) .del() - .where(await this.model.mapAliasToColumn(d)); + .where(data); res.push(response); } }