From 156ecd6c1bf93ba09eb59dbda836d64f85d39897 Mon Sep 17 00:00:00 2001 From: mertmit Date: Thu, 2 May 2024 16:36:07 +0300 Subject: [PATCH] fix: extract pk logic Signed-off-by: mertmit --- packages/nc-gui/utils/dataUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/utils/dataUtils.ts b/packages/nc-gui/utils/dataUtils.ts index 25ccc1cd89..a7e0d9f500 100644 --- a/packages/nc-gui/utils/dataUtils.ts +++ b/packages/nc-gui/utils/dataUtils.ts @@ -8,7 +8,7 @@ export const extractPkFromRow = (row: Record, columns: ColumnType[] const pkColumns = columns.filter((c) => c.pk) - if (pkColumns.every((c) => row?.[c.title as string] === null && row?.[c.title as string] === undefined)) return null + if (pkColumns.every((c) => row?.[c.title as string] === null || row?.[c.title as string] === undefined)) return null return pkColumns.map((c) => row?.[c.title as string]).join('___') }