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), dbDriver: await NcConnectionMgrv2.get(base),
}); });
const { ast } = await getAst({ const { ast, dependencyFields } = await getAst({
query: param.query, query: param.query,
model, model,
extractOnlyPrimaries: true, extractOnlyPrimaries: true,
}); });
let data = []; let data = [];
let count = 0; let count = 0;
try { try {
data = data = await nocoExecute( data = data = await nocoExecute(
ast, 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) { } catch (e) {
// show empty result instead of throwing error here console.log(e);
// e.g. search some text in a numeric field NcError.internalServerError('Please check server log for more details');
} }
return new PagedResponseImpl(data, { ...param.query, count }); return new PagedResponseImpl(data, { ...param.query, count });

Loading…
Cancel
Save