Add comment

This commit is contained in:
Adria Navarro 2025-01-13 11:52:15 +01:00
parent 20a226a0a5
commit 6b780e6865
1 changed files with 2 additions and 1 deletions

View File

@ -91,13 +91,14 @@ export const patchAPI = (API: APIClient) => {
return await enrichRows(rows, tableId) return await enrichRows(rows, tableId)
} }
// Wipe any HBS formulae from table definitions, as these interfere with // Wipe any HBS formulas from table definitions, as these interfere with
// handlebars enrichment // handlebars enrichment
const fetchTableDefinition = API.fetchTableDefinition const fetchTableDefinition = API.fetchTableDefinition
API.fetchTableDefinition = async tableId => { API.fetchTableDefinition = async tableId => {
const definition = await fetchTableDefinition(tableId) const definition = await fetchTableDefinition(tableId)
Object.keys(definition?.schema || {}).forEach(field => { Object.keys(definition?.schema || {}).forEach(field => {
if (definition.schema[field]?.type === "formula") { if (definition.schema[field]?.type === "formula") {
// @ts-expect-error TODO check what use case removing that would break
delete definition.schema[field].formula delete definition.schema[field].formula
} }
}) })