1
0
Fork 0
mirror of synced 2024-06-26 10:00:41 +12:00

Fix for #6702 - remove users table as an option for automation triggers.

This commit is contained in:
mike12345567 2022-07-15 13:39:47 +01:00
parent e0496f604e
commit 320e41c393
2 changed files with 10 additions and 1 deletions

View file

@ -41,6 +41,7 @@
let fillWidth = true
let codeBindingOpen = false
$: console.log(block)
$: stepId = block.stepId
$: bindings = getAvailableBindings(
block || $automationStore.selectedBlock,
@ -54,6 +55,7 @@
$: schema = getSchemaForTable(tableId, { searchableSchema: true }).schema
$: schemaFields = Object.values(schema || {})
$: queryLimit = tableId?.includes("datasource") ? "∞" : "1000"
$: isTrigger = block?.type === "TRIGGER"
const onChange = Utils.sequential(async (e, key) => {
try {
@ -261,6 +263,7 @@
/>
{:else if value.customType === "table"}
<TableSelector
{isTrigger}
value={inputData[key]}
on:change={e => onChange(e, key)}
/>

View file

@ -2,10 +2,16 @@
import { tables } from "stores/backend"
import { Select } from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import { TableNames } from "constants"
const dispatch = createEventDispatcher()
export let value
export let isTrigger
$: filteredTables = $tables.list.filter(table => {
return !isTrigger || table._id !== TableNames.USERS
})
const onChange = e => {
value = e.detail
@ -16,7 +22,7 @@
<Select
on:change={onChange}
bind:value
options={$tables.list}
options={filteredTables}
getOptionLabel={table => table.name}
getOptionValue={table => table._id}
/>