Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

refactor: use `isSystemColumn` method to filter system columns

Pranav Cf851df5c9d42
diff --git a/packages/nocodb/src/services/api-docs/swaggerV3/templates/schemas.ts b/packages/nocodb/src/services/api-docs/swaggerV3/templates/schemas.ts
index b57fc4f1d2..21fd97ec96 100644
--- a/packages/nocodb/src/services/api-docs/swaggerV3/templates/schemas.ts
+++ b/packages/nocodb/src/services/api-docs/swaggerV3/templates/schemas.ts
@@ -24,7 +24,7 @@ export const getModelSchemas = (ctx: {
...(ctx.columns?.reduce(
(colsObj, { title, virtual, column, ...fieldProps }) => ({
...colsObj,
- ...(column.system || column.pk
+ ...(isSystemColumn(column) || column.pk
? {}
: {
[title]: fieldProps,
@@ -140,7 +140,7 @@ export const getViewSchemas = (ctx: {
...(ctx.columns?.reduce(
(colsObj, { title, virtual, column, ...fieldProps }) => ({
...colsObj,
- ...(column.system || column.pk
+ ...(isSystemColumn(column) || column.pk
? {}
: {
[title]: fieldProps,