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. 2
      packages/nocodb/src/lib/noco/meta/api/swagger/helpers/getSwaggerColumnMetas.ts

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

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

Loading…
Cancel
Save