Remove table ID from custom queries to fix 500 errors when trying to fetch a table definition and passing up a query ID, and fix issue with search fields when no table ID exists
This commit is contained in:
parent
57d1d9c2d5
commit
c9d0791a0e
|
@ -52,7 +52,6 @@
|
|||
.map(query => ({
|
||||
label: query.name,
|
||||
name: query.name,
|
||||
tableId: query._id,
|
||||
...query,
|
||||
type: "query",
|
||||
}))
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
function getOptions(ds, dsSchema) {
|
||||
let base = Object.values(dsSchema)
|
||||
if (!ds?.tableId) {
|
||||
return base
|
||||
return base.map(field => field.name)
|
||||
}
|
||||
const currentTable = $tables.list.find(table => table._id === ds.tableId)
|
||||
return getFields(base, { allowLinks: currentTable?.sql }).map(
|
||||
|
|
Loading…
Reference in New Issue