Browse Source

fix: handle `null` case if colOpt is missing

re #1900

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1901/head
Pranav C 3 years ago
parent
commit
4cb5a5d0ba
  1. 8
      packages/nocodb/src/lib/noco/meta/api/swagger/helpers/getSwaggerColumnMetas.ts

8
packages/nocodb/src/lib/noco/meta/api/swagger/helpers/getSwaggerColumnMetas.ts

@ -26,9 +26,11 @@ export default async (
const colOpt = await c.getColOptions<LinkToAnotherRecordColumn>(
ncMeta
);
const relTable = await colOpt.getRelatedTable(ncMeta);
field.type = undefined;
field.$ref = `#/components/schemas/${relTable.title}Request`;
if (colOpt) {
const relTable = await colOpt.getRelatedTable(ncMeta);
field.type = undefined;
field.$ref = `#/components/schemas/${relTable.title}Request`;
}
}
break;
case UITypes.Formula:

Loading…
Cancel
Save