Browse Source

fix: handle undefined insertId

pull/2424/head
Wing-Kam Wong 3 years ago
parent
commit
28fd180c03
  1. 2
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

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

@ -1277,7 +1277,7 @@ class BaseModelSqlv2 {
id = response[0];
} else {
const res = await this.extractRawQueryAndExec(query);
id = res.id ?? res[0].insertId;
id = res?.id ?? res[0]?.insertId;
}
if (ai) {

Loading…
Cancel
Save