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