1
0
Fork 0
mirror of synced 2024-06-30 12:00:31 +12:00

Merge pull request #6928 from Budibase/fix/july-release-fixes

Various July fixes
This commit is contained in:
Michael Drury 2022-07-27 17:38:17 +01:00 committed by GitHub
commit 717e28a69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 17 deletions

View file

@ -127,7 +127,7 @@ module.exports = (
} }
if (!user && tenantId) { if (!user && tenantId) {
user = { tenantId } user = { tenantId }
} else { } else if (user) {
delete user.password delete user.password
} }
// be explicit // be explicit

View file

@ -5,9 +5,8 @@
import { ActionStepID } from "constants/backend/automations" import { ActionStepID } from "constants/backend/automations"
export let automation export let automation
export let testResults
let blocks let blocks, testResults
$: { $: {
blocks = [] blocks = []
@ -18,15 +17,11 @@
blocks = blocks blocks = blocks
.concat(automation.definition.steps || []) .concat(automation.definition.steps || [])
.filter(x => x.stepId !== ActionStepID.LOOP) .filter(x => x.stepId !== ActionStepID.LOOP)
} else if (testResults) { } else if ($automationStore.selectedAutomation) {
blocks = testResults.steps || [] automation = $automationStore.selectedAutomation
}
}
$: {
if (!testResults) {
testResults = $automationStore.selectedAutomation?.testResults
} }
} }
$: testResults = $automationStore.selectedAutomation?.testResults
</script> </script>
<div class="title"> <div class="title">

View file

@ -96,12 +96,14 @@ exports.run = async function ({ inputs, appId }) {
tableId, tableId,
}, },
body: { body: {
sortOrder,
sortType, sortType,
limit,
sort: sortColumn, sort: sortColumn,
query: filters || {}, query: filters || {},
limit, // default to ascending, like data tab
sortOrder: sortOrder || SortOrders.ASCENDING,
}, },
version: "1",
}) })
try { try {
await rowController.search(ctx) await rowController.search(ctx)

View file

@ -17,7 +17,8 @@ exports.getFetchResponse = async fetched => {
// need to make sure all ctx structures have the // need to make sure all ctx structures have the
// throw added to them, so that controllers don't // throw added to them, so that controllers don't
// throw a ctx.throw undefined when error occurs // throw a ctx.throw undefined when error occurs
exports.buildCtx = (appId, emitter, { body, params } = {}) => { // opts can contain, body, params and version
exports.buildCtx = (appId, emitter, opts = {}) => {
const ctx = { const ctx = {
appId, appId,
user: { appId }, user: { appId },
@ -26,11 +27,14 @@ exports.buildCtx = (appId, emitter, { body, params } = {}) => {
throw error throw error
}, },
} }
if (body) { if (opts.body) {
ctx.request = { body } ctx.request = { body: opts.body }
} }
if (params) { if (opts.params) {
ctx.params = params ctx.params = opts.params
}
if (opts.version) {
ctx.version = opts.version
} }
return ctx return ctx
} }