Browse Source

fix: mm list in shared list

pull/5444/head
Wing-Kam Wong 2 years ago
parent
commit
fc31b2fae8
  1. 14
      packages/nocodb-nest/src/services/public-datas.service.ts

14
packages/nocodb-nest/src/services/public-datas.service.ts

@ -324,25 +324,27 @@ export class PublicDatasService {
dbDriver: await NcConnectionMgrv2.get(base),
});
const { ast } = await getAst({
const { ast, dependencyFields } = await getAst({
query: param.query,
model,
extractOnlyPrimaries: true,
});
let data = [];
let count = 0;
try {
data = data = await nocoExecute(
ast,
await baseModel.list(param.query),
await baseModel.list(dependencyFields),
{},
param.query,
dependencyFields,
);
count = await baseModel.count(param.query);
count = await baseModel.count(dependencyFields);
} catch (e) {
// show empty result instead of throwing error here
// e.g. search some text in a numeric field
console.log(e);
NcError.internalServerError('Please check server log for more details');
}
return new PagedResponseImpl(data, { ...param.query, count });

Loading…
Cancel
Save