Browse Source

fix: load other aggregations even formula Column is error (#9343)

pull/9349/head
Anbarasu 3 months ago committed by GitHub
parent
commit
820280e660
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      packages/nocodb/src/db/aggregation.ts

12
packages/nocodb/src/db/aggregation.ts

@ -8,7 +8,12 @@ import {
UITypes,
} from 'nocodb-sdk';
import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2';
import type { BarcodeColumn, QrCodeColumn, RollupColumn } from '~/models';
import type {
BarcodeColumn,
FormulaColumn,
QrCodeColumn,
RollupColumn,
} from '~/models';
import { Column } from '~/models';
import { NcError } from '~/helpers/catchError';
import genRollupSelectv2 from '~/db/genRollupSelectv2';
@ -151,9 +156,14 @@ export default async function applyAggregation({
break;
case UITypes.Formula:
const formula = await column.getColOptions<FormulaColumn>(context);
if (formula.error) {
aggregation = CommonAggregations.None;
} else {
column_name_query = (
await baseModelSqlv2.getSelectQueryBuilderForFormula(column)
).builder;
}
break;
case UITypes.LinkToAnotherRecord:

Loading…
Cancel
Save