Do not set sort column if display is formula (#9378)

* Unset sort column if it is formula

* Null safety
This commit is contained in:
melohagan 2023-01-19 13:32:45 +00:00 committed by GitHub
parent a1860a9ffe
commit e35bb2db3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -681,6 +681,12 @@ export class ExternalRequest {
config, config,
table table
) )
//if the sort column is a formula, remove it
for (let sortColumn of Object.keys(sort || {})) {
if (table.schema[sortColumn]?.type === "formula") {
delete sort?.[sortColumn]
}
}
filters = buildFilters(id, filters || {}, table) filters = buildFilters(id, filters || {}, table)
const relationships = this.buildRelationships(table) const relationships = this.buildRelationships(table)
// clean up row on ingress using schema // clean up row on ingress using schema