From 201b26059c27546f7a9f0020308f0793d7cb2cfb Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 15 Apr 2021 21:34:03 +0100 Subject: [PATCH] account for empty user id in automations --- packages/builder/cypress/integration/createBinding.spec.js | 2 +- packages/server/src/api/controllers/row.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/integration/createBinding.spec.js b/packages/builder/cypress/integration/createBinding.spec.js index 04b5366337..e35abc9dc3 100644 --- a/packages/builder/cypress/integration/createBinding.spec.js +++ b/packages/builder/cypress/integration/createBinding.spec.js @@ -10,7 +10,7 @@ context("Create Bindings", () => { addSettingBinding("text", "Current User._id") cy.getComponent(componentId).should( "have.text", - `ro_ta_users_us_test@test.com` + `ro_ta_users_test@test.com` ) }) }) diff --git a/packages/server/src/api/controllers/row.js b/packages/server/src/api/controllers/row.js index 2987cbeace..2d934b3fac 100644 --- a/packages/server/src/api/controllers/row.js +++ b/packages/server/src/api/controllers/row.js @@ -150,7 +150,7 @@ exports.save = async function(ctx) { // this returns the table and row incase they have been updated const dbTable = await db.get(inputs.tableId) - let { table, row } = inputProcessing(ctx.user, dbTable, inputs) + let { table, row } = inputProcessing(ctx.user || {}, dbTable, inputs) const validateResult = await validate({ row, table,