Merge pull request #8088 from shumpeiKishi/bug/automation-update-row-boolean-false-doesnt-work

Automation: Update row to make a boolean Value "FALSE" does not work #8030
This commit is contained in:
melohagan 2022-10-03 10:19:54 +01:00 committed by GitHub
commit d50d456e0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -66,9 +66,9 @@ exports.run = async function ({ inputs, appId, emitter }) {
} }
const tableId = inputs.row.tableId const tableId = inputs.row.tableId
// clear any falsy properties so that they aren't updated // clear any undefined, null or empty string properties so that they aren't updated
for (let propKey of Object.keys(inputs.row)) { for (let propKey of Object.keys(inputs.row)) {
if (!inputs.row[propKey] || inputs.row[propKey] === "") { if (inputs.row[propKey] == null || inputs.row[propKey] === "") {
delete inputs.row[propKey] delete inputs.row[propKey]
} }
} }