From e941491d8ce9019128ddf291978885c192de0aac Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 20 Aug 2024 13:24:41 +0100 Subject: [PATCH] Don't check row value - always use the column or not. --- packages/server/src/db/linkedRows/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/server/src/db/linkedRows/index.ts b/packages/server/src/db/linkedRows/index.ts index 1b3fd4f809..037e53d02f 100644 --- a/packages/server/src/db/linkedRows/index.ts +++ b/packages/server/src/db/linkedRows/index.ts @@ -226,16 +226,13 @@ function getPrimaryDisplayValue(row: Row, table?: Table) { let invalid = true if (primaryDisplay) { const primaryDisplaySchema = table?.schema[primaryDisplay] - invalid = - INVALID_DISPLAY_COLUMN_TYPE.includes(primaryDisplaySchema.type) && - row[primaryDisplay] + invalid = INVALID_DISPLAY_COLUMN_TYPE.includes(primaryDisplaySchema.type) } if (invalid || !primaryDisplay) { const validKey = Object.keys(table?.schema || {}).filter( key => table?.schema[key].type && - !INVALID_DISPLAY_COLUMN_TYPE.includes(table?.schema[key].type) && - row[key] + !INVALID_DISPLAY_COLUMN_TYPE.includes(table?.schema[key].type) ) return validKey[0] ? row[validKey[0]] : undefined } else {