Fix calc view schemas not being determined correctly
This commit is contained in:
parent
09e3ab9078
commit
7f92c82298
|
@ -231,6 +231,15 @@ export const getSchemaForDatasource = (datasource, isForm = false) => {
|
|||
if (table) {
|
||||
if (type === "view") {
|
||||
schema = cloneDeep(table.views?.[datasource.name]?.schema)
|
||||
|
||||
// Some calc views don't include a "name" property inside the schema
|
||||
if (schema) {
|
||||
Object.keys(schema).forEach(field => {
|
||||
if (!schema[field].name) {
|
||||
schema[field].name = field
|
||||
}
|
||||
})
|
||||
}
|
||||
} else if (type === "query" && isForm) {
|
||||
schema = {}
|
||||
const params = table.parameters || []
|
||||
|
|
Loading…
Reference in New Issue