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) {
user = { tenantId }
} else {
} else if (user) {
delete user.password
}
// be explicit

View File

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

View File

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

View File

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