Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ijreilly committed Jan 15, 2025
1 parent 911ea79 commit 9207393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { SelectQueryBuilder } from 'typeorm';

import { AGGREGATE_OPERATIONS } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant';
import { AggregationField } from 'src/engine/api/graphql/workspace-schema-builder/utils/get-available-aggregations-from-object-fields.util';
import { FIELD_METADATA_TYPES_TO_TEXT_COLUMN_TYPE } from 'src/engine/metadata-modules/workspace-migration/constants/fieldMetadataTypesToTextColumnType';
import { formatColumnNamesFromCompositeFieldAndSubfields } from 'src/engine/twenty-orm/utils/format-column-names-from-composite-field-and-subfield.util';
import { isDefined } from 'src/utils/is-defined';

Expand Down Expand Up @@ -50,14 +49,9 @@ export class ProcessAggregateHelper {

const concatenatedColumns = columnNames
.map((col) => `"${col}"`)
.join(", ' ', ");
.join(',');

const columnExpression =
FIELD_METADATA_TYPES_TO_TEXT_COLUMN_TYPE.includes(
aggregatedField.fromFieldType,
)
? `NULLIF(CONCAT(${concatenatedColumns}), '')`
: `CONCAT(${concatenatedColumns})`;
const columnExpression = `NULLIF(CONCAT(${concatenatedColumns}), '')`;

switch (aggregatedField.aggregateOperation) {
case AGGREGATE_OPERATIONS.countEmpty:
Expand Down

This file was deleted.

0 comments on commit 9207393

Please sign in to comment.