Browse Source

fix: formula LTAR column references

pull/5444/head
Wing-Kam Wong 2 years ago
parent
commit
c9d35186d8
  1. 2
      packages/nocodb-nest/src/db/formulav2/formulaQueryBuilderv2.ts

2
packages/nocodb-nest/src/db/formulav2/formulaQueryBuilderv2.ts

@ -670,7 +670,7 @@ async function _formulaQueryBuilder(
} else if (pt.type === 'Identifier') { } else if (pt.type === 'Identifier') {
const { builder } = await aliasToColumn?.[pt.name]?.(); const { builder } = await aliasToColumn?.[pt.name]?.();
if (typeof builder === 'function') { if (typeof builder === 'function') {
return { builder: knex.raw(`??${colAlias}`, await builder(pt.fnName)) }; return { builder: knex.raw(`??${colAlias}`, builder(pt.fnName)) };
} }
return { builder: knex.raw(`??${colAlias}`, [builder || pt.name]) }; return { builder: knex.raw(`??${colAlias}`, [builder || pt.name]) };
} else if (pt.type === 'BinaryExpression') { } else if (pt.type === 'BinaryExpression') {

Loading…
Cancel
Save