mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 19:36:37 +00:00
fix: better logic for condition
This commit is contained in:
@@ -8,7 +8,7 @@ export const extractPkFromRow = (row: Record<string, any>, columns: ColumnType[]
|
||||
|
||||
const pkColumns = columns.filter((c) => c.pk)
|
||||
|
||||
if (!pkColumns.some((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('___')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user