Browse Source

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

pull/7304/head
Pranav C 8 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 {
Column,
LinkToAnotherRecordColumn,
@ -154,7 +160,10 @@ const getAst = async ({
} else if (allowedCols && (!includePkByDefault || !col.pk)) {
isRequested =
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)) &&
value;
} else if (fields?.length) {

Loading…
Cancel
Save