Browse Source

Merge pull request #8377 from nocodb/fix/util-logic

fix: extract pk logic
pull/8376/head
Mert E 2 months ago committed by GitHub
parent
commit
c1f6dd2d99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/nc-gui/utils/dataUtils.ts

2
packages/nc-gui/utils/dataUtils.ts

@ -8,7 +8,7 @@ export const extractPkFromRow = (row: Record<string, any>, 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('___')
}

Loading…
Cancel
Save