1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +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) {
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
}