From a790d6cd74147fd487367bdcd380e245ecedad2e Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 22 Sep 2023 11:05:24 +0100 Subject: [PATCH] Let null and blank strings be saved as they are --- packages/server/src/api/controllers/row/ExternalRequest.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 2c4428599b..e5b2a82311 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -305,12 +305,7 @@ export class ExternalRequest { manyRelationships: ManyRelationship[] = [] for (let [key, field] of Object.entries(table.schema)) { // if set already, or not set just skip it - if (row[key] == null || newRow[key] || !isEditableColumn(field)) { - continue - } - // if its an empty string then it means return the column to null (if possible) - if (row[key] === "") { - newRow[key] = null + if (row[key] === undefined || newRow[key] || !isEditableColumn(field)) { continue } // parse floats/numbers