Browse Source

fix: pass parsed query to nocoExecute for avoiding unexpected column extraction

pull/6445/head
Pranav C 1 year ago
parent
commit
267d616161
  1. 4
      packages/nocodb/src/helpers/getAst.ts
  2. 2
      packages/nocodb/src/modules/datas/helpers.ts

4
packages/nocodb/src/helpers/getAst.ts

@ -56,7 +56,7 @@ const getAst = async ({
await extractDependencies(model.displayValue, dependencyFields); await extractDependencies(model.displayValue, dependencyFields);
return { ast, dependencyFields }; return { ast, dependencyFields, parsedQuery: query };
} }
let fields = query?.fields || query?.f; let fields = query?.fields || query?.f;
@ -154,7 +154,7 @@ const getAst = async ({
}; };
}, Promise.resolve({})); }, Promise.resolve({}));
return { ast, dependencyFields }; return { ast, dependencyFields, parsedQuery: dependencyFields };
}; };
const extractDependencies = async ( const extractDependencies = async (

2
packages/nocodb/src/modules/datas/helpers.ts

@ -260,7 +260,7 @@ export async function getDbRows(param: {
ast, ast,
await baseModel.list({ ...listArgs, ...dependencyFields, offset, limit }), await baseModel.list({ ...listArgs, ...dependencyFields, offset, limit }),
{}, {},
query, dependencyFields,
); );
if (!rows?.length) { if (!rows?.length) {

Loading…
Cancel
Save