Browse Source

refactor: exclude nested params for system fields

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6787/head
Pranav C 1 year ago
parent
commit
70891e74e5
  1. 4
      packages/nocodb/src/services/api-docs/swagger/templates/params.ts

4
packages/nocodb/src/services/api-docs/swagger/templates/params.ts

@ -197,6 +197,10 @@ export const getNestedParams = async (
): Promise<any[]> => { ): Promise<any[]> => {
return await columns.reduce(async (paramsArr, { column }) => { return await columns.reduce(async (paramsArr, { column }) => {
if (column.uidt === UITypes.LinkToAnotherRecord) { if (column.uidt === UITypes.LinkToAnotherRecord) {
// exclude system columns(relations to junction table)
if (column.system) {
return paramsArr;
}
const colOpt = await column.getColOptions<LinkToAnotherRecordColumn>(); const colOpt = await column.getColOptions<LinkToAnotherRecordColumn>();
if (colOpt.type !== RelationTypes.BELONGS_TO) { if (colOpt.type !== RelationTypes.BELONGS_TO) {
return [ return [

Loading…
Cancel
Save