Browse Source

fix: handle Links column properly while generating AST

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5848/head
Pranav C 1 year ago
parent
commit
29fced3a82
  1. 9
      packages/nocodb/src/helpers/getAst.ts

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

@ -89,11 +89,12 @@ const getAst = async ({
value = ast;
// todo: include field relative to the relation => pk / fk
} else if (col.uidt === UITypes.Links) {
value = 1;
} else {
value = (Array.isArray(fields) ? fields : fields.split(',')).reduce(
(o, f) => ({ ...o, [f]: 1 }),
{},
);
value = (
Array.isArray(nestedFields) ? nestedFields : nestedFields.split(',')
).reduce((o, f) => ({ ...o, [f]: 1 }), {});
}
} else if (col.uidt === UITypes.LinkToAnotherRecord) {
const model = await col

Loading…
Cancel
Save