Browse Source

correct audit logs when primary key is not id column

Signed-off-by: Vijay Kumar Rathore <professional.vijay8492@gmail.com>
pull/1457/head
Vijay Kumar Rathore 3 years ago
parent
commit
da45cc38a5
  1. 3
      packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts

3
packages/nocodb/src/lib/dataMapper/lib/sql/BaseModelSql.ts

@ -309,12 +309,13 @@ class BaseModelSql extends BaseModel {
response = data;
}
} else if (ai) {
response = await this.nestedRead(
const nestedResponse = await this.nestedRead(
Array.isArray(response)
? response?.[0]?.[ai._cn]
: response?.[ai._cn],
this.defaultNestedBtQueryParams
);
response = !_.isEmpty(nestedResponse) ? nestedResponse : response;
}
if (Array.isArray(response)) {

Loading…
Cancel
Save