Defaulting to null in the updateRow step causes issues in row mapping. Switching back to empty string
This commit is contained in:
parent
d10ef7b795
commit
2243314314
|
@ -87,7 +87,7 @@ export async function run({ inputs, appId, emitter }: AutomationStepInput) {
|
||||||
|
|
||||||
// Legacy
|
// Legacy
|
||||||
// Find previously set values and add them to the update. Ensure empty relationships
|
// Find previously set values and add them to the update. Ensure empty relationships
|
||||||
// are added to the update is clearRelationships is true
|
// are added to the update if clearRelationships is true
|
||||||
const legacyUpdated = Object.keys(inputs.row || {}).reduce(
|
const legacyUpdated = Object.keys(inputs.row || {}).reduce(
|
||||||
(acc: Record<string, any>, key: string) => {
|
(acc: Record<string, any>, key: string) => {
|
||||||
const isEmpty = inputs.row[key] == null || inputs.row[key]?.length === 0
|
const isEmpty = inputs.row[key] == null || inputs.row[key]?.length === 0
|
||||||
|
@ -119,10 +119,7 @@ export async function run({ inputs, appId, emitter }: AutomationStepInput) {
|
||||||
return acc
|
return acc
|
||||||
}
|
}
|
||||||
acc[key] =
|
acc[key] =
|
||||||
Object.hasOwn(inputs.row || {}, key) &&
|
!inputs.row[key] || inputs.row[key]?.length === 0 ? "" : inputs.row[key]
|
||||||
(!inputs.row[key] || inputs.row[key]?.length === 0)
|
|
||||||
? null
|
|
||||||
: inputs.row[key]
|
|
||||||
return acc
|
return acc
|
||||||
},
|
},
|
||||||
{}
|
{}
|
||||||
|
|
Loading…
Reference in New Issue