From 17588d9f6b7ba6b4b687458ab1490d2764d32b36 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 18 Sep 2020 16:45:03 +0100 Subject: [PATCH 1/2] Fix for when table is deleted, was attempting to retrieve views for the table which no longer exists. --- packages/builder/src/builderStore/store/backend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index fec21a467e..4b7058a8b9 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -82,7 +82,7 @@ export const getBackendUiStore = () => { state.models = state.models.filter( existing => existing._id !== model._id ) - state.selectedModel = state.models[0] || {} + state.selectedModel = {} return state }) }, From cfb10ebbe23e28ee4c8a909cd241c42fb0d22cf0 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 18 Sep 2020 17:20:19 +0100 Subject: [PATCH 2/2] Outputting the input record so that it can be used in later steps. --- packages/server/src/workflows/steps/saveRecord.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/server/src/workflows/steps/saveRecord.js b/packages/server/src/workflows/steps/saveRecord.js index 7fec84e781..7c571e5678 100644 --- a/packages/server/src/workflows/steps/saveRecord.js +++ b/packages/server/src/workflows/steps/saveRecord.js @@ -28,6 +28,11 @@ module.exports.definition = { }, outputs: { properties: { + record: { + type: "object", + customType: "record", + description: "The new record", + }, response: { type: "object", description: "The response from the table", @@ -69,6 +74,7 @@ module.exports.run = async function({ inputs, instanceId }) { try { await recordController.save(ctx) return { + record: inputs.record, response: ctx.body, id: ctx.body._id, revision: ctx.body._rev,