1
0
Fork 0
mirror of synced 2024-06-22 16:10:40 +12:00

Decode id if needed

This commit is contained in:
Mel O'Hagan 2022-10-27 16:28:26 +01:00
parent 36801cc928
commit 4403b2fb22

View file

@ -282,8 +282,12 @@ module External {
const linkTablePrimary = linkTable.primary[0]
// one to many
if (isOneSide(field)) {
let id = row[key][0]
if (isNaN(id)) {
id = decodeURIComponent(row[key]).match(/\[(.*?)\]/)?.[1]
}
newRow[field.foreignKey || linkTablePrimary] = breakRowIdField(
row[key][0]
id
)[0]
}
// many to many