Decode id if needed
This commit is contained in:
parent
36801cc928
commit
4403b2fb22
|
@ -282,8 +282,12 @@ module External {
|
||||||
const linkTablePrimary = linkTable.primary[0]
|
const linkTablePrimary = linkTable.primary[0]
|
||||||
// one to many
|
// one to many
|
||||||
if (isOneSide(field)) {
|
if (isOneSide(field)) {
|
||||||
|
let id = row[key][0]
|
||||||
|
if (isNaN(id)) {
|
||||||
|
id = decodeURIComponent(row[key]).match(/\[(.*?)\]/)?.[1]
|
||||||
|
}
|
||||||
newRow[field.foreignKey || linkTablePrimary] = breakRowIdField(
|
newRow[field.foreignKey || linkTablePrimary] = breakRowIdField(
|
||||||
row[key][0]
|
id
|
||||||
)[0]
|
)[0]
|
||||||
}
|
}
|
||||||
// many to many
|
// many to many
|
||||||
|
|
Loading…
Reference in New Issue