Browse Source

fix: substitute title and generate proper response

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7161/head
Pranav C 12 months ago
parent
commit
7a6351c915
  1. 8
      packages/nocodb/src/db/BaseModelSqlv2.ts

8
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -1208,10 +1208,8 @@ class BaseModelSqlv2 {
!this.isSqlite,
);
let children = await this.execAndParse(finalQb, childTable);
if (this.isMySQL) {
children = children[0];
}
const children = await this.execAndParse(finalQb, childTable);
const proto = await (
await Model.getBaseModelSQL({
id: rtnId,
@ -4408,7 +4406,7 @@ class BaseModelSqlv2 {
let data =
this.isPg || this.isSnowflake
? (await this.dbDriver.raw(query))?.rows
: query.slice(0, 6) === 'select' && !this.isMssql
: /^(\(|)select/.test(query) && !this.isMssql
? await this.dbDriver.from(
this.dbDriver.raw(query).wrap('(', ') __nc_alias'),
)

Loading…
Cancel
Save