Fix sql calculations
This commit is contained in:
parent
7932ee7620
commit
499d3f2041
|
@ -169,10 +169,8 @@ export async function buildSqlFieldList(
|
||||||
fields = Object.keys(helpers.views.basicFields(source))
|
fields = Object.keys(helpers.views.basicFields(source))
|
||||||
.filter(f => table.schema[f].type !== FieldType.LINK)
|
.filter(f => table.schema[f].type !== FieldType.LINK)
|
||||||
.map(c => `${table.name}.${c}`)
|
.map(c => `${table.name}.${c}`)
|
||||||
} else {
|
|
||||||
fields = extractRealFields(source)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!helpers.views.isCalculationView(source)) {
|
||||||
fields.push(
|
fields.push(
|
||||||
...getRequiredFields(
|
...getRequiredFields(
|
||||||
{
|
{
|
||||||
|
@ -182,6 +180,10 @@ export async function buildSqlFieldList(
|
||||||
fields
|
fields
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fields = extractRealFields(source)
|
||||||
|
}
|
||||||
|
|
||||||
for (const field of Object.values(table.schema)) {
|
for (const field of Object.values(table.schema)) {
|
||||||
if (field.type !== FieldType.LINK || !relationships || !field.tableId) {
|
if (field.type !== FieldType.LINK || !relationships || !field.tableId) {
|
||||||
|
|
Loading…
Reference in New Issue