Browse Source

fix: extract created/lastmodified by default if fields/viewId is not defined

pull/7304/head
Pranav C 12 months ago
parent
commit
52d8949515
  1. 13
      packages/nocodb/src/helpers/getAst.ts

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

@ -1,4 +1,10 @@
import { isCreatedTimeOrUpdatedTimeCol, isSystemColumn, RelationTypes, UITypes, ViewTypes } from 'nocodb-sdk' import {
isCreatedTimeOrUpdatedTimeCol,
isSystemColumn,
RelationTypes,
UITypes,
ViewTypes,
} from 'nocodb-sdk';
import type { import type {
Column, Column,
LinkToAnotherRecordColumn, LinkToAnotherRecordColumn,
@ -154,7 +160,10 @@ const getAst = async ({
} else if (allowedCols && (!includePkByDefault || !col.pk)) { } else if (allowedCols && (!includePkByDefault || !col.pk)) {
isRequested = isRequested =
allowedCols[col.id] && allowedCols[col.id] &&
(!isSystemColumn(col) || view.show_system_fields || col.pv) && (!isSystemColumn(col) ||
(!view && isCreatedTimeOrUpdatedTimeCol(col)) ||
view.show_system_fields ||
col.pv) &&
(!fields?.length || fields.includes(col.title)) && (!fields?.length || fields.includes(col.title)) &&
value; value;
} else if (fields?.length) { } else if (fields?.length) {

Loading…
Cancel
Save