Browse Source

fix: formula LTAR column references

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5421/head
mertmit 2 years ago
parent
commit
58600502a3
  1. 2
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/formulav2/formulaQueryBuilderv2.ts

2
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/formulav2/formulaQueryBuilderv2.ts

@ -656,7 +656,7 @@ async function _formulaQueryBuilder(
} else if (pt.type === 'Identifier') {
const { builder } = await aliasToColumn?.[pt.name]?.();
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]) };
} else if (pt.type === 'BinaryExpression') {

Loading…
Cancel
Save