From 323c5b9a05227c4eb75374ece68b22ac3306cfdb Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 22 Oct 2024 17:35:10 +0000 Subject: [PATCH] fix: missing return --- packages/nc-gui/utils/dataUtils.ts | 2 +- packages/nocodb/src/db/BaseModelSqlv2.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/utils/dataUtils.ts b/packages/nc-gui/utils/dataUtils.ts index 0451161908..dc03cbb218 100644 --- a/packages/nc-gui/utils/dataUtils.ts +++ b/packages/nc-gui/utils/dataUtils.ts @@ -29,7 +29,7 @@ export const extractPkFromRow = (row: Record, columns: ColumnType[] const pkCols = columns.filter((c: Required) => c.pk) // if multiple pk columns, join them with ___ and escape _ in id values with \_ to avoid conflicts if (pkCols.length > 1) { - pkCols.map((c: Required) => row?.[c.title]?.toString?.().replaceAll('_', '\\_') ?? null).join('___') + return pkCols.map((c: Required) => row?.[c.title]?.toString?.().replaceAll('_', '\\_') ?? null).join('___') } else if (pkCols.length) { return row?.[pkCols[0].title] ?? null } diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index cef6a5a490..c08b622595 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -10230,7 +10230,7 @@ export function getCompositePkValue(primaryKeys: Column[], row) { if (typeof row !== 'object') return row; if (primaryKeys.length > 1) { - primaryKeys.map((c) => + return primaryKeys.map((c) => (row[c.title] ?? row[c.column_name])?.toString?.().replaceAll('_', '\\_'), ); }