Browse Source

Merge pull request #4632 from willnewii/fix/cannot_find_Id

fix: can’t find Id
pull/4646/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
001e0f0c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

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

@ -1987,11 +1987,15 @@ class BaseModelSqlv2 {
async bulkDelete(ids: any[], { cookie }: { cookie?: any } = {}) {
let transaction;
try {
const deleteIds = await Promise.all(
ids.map((d) => this.model.mapAliasToColumn(d))
);
transaction = await this.dbDriver.transaction();
// await this.beforeDeleteb(ids, transaction);
const res = [];
for (const d of ids) {
for (const d of deleteIds) {
if (Object.keys(d).length) {
const response = await transaction(this.model.table_name)
.del()

Loading…
Cancel
Save