From 64de5e301e0d9daab767a6cbc848b3f8e8c138c7 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 28 Apr 2022 23:57:33 +0100 Subject: [PATCH] accounting for false values in row processing --- packages/server/src/api/controllers/row/ExternalRequest.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 1e3a300afd..75706d9e74 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -175,9 +175,10 @@ module External { const thisRow: Row = {} // filter the row down to what is actually the row (not joined) for (let fieldName of Object.keys(table.schema)) { - const value = row[`${table.name}.${fieldName}`] || row[fieldName] + const pathValue = row[`${table.name}.${fieldName}`] + const value = pathValue != null ? pathValue : row[fieldName] // all responses include "select col as table.col" so that overlaps are handled - if (value) { + if (value != null) { thisRow[fieldName] = value } }