Browse Source

fix: use user email for formula

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/7202/head
mertmit 1 year ago
parent
commit
287ac647b1
  1. 5
      packages/nocodb/src/db/formulav2/formulaQueryBuilderv2.ts

5
packages/nocodb/src/db/formulav2/formulaQueryBuilderv2.ts

@ -647,10 +647,7 @@ async function _formulaQueryBuilder(
// create nested replace statement for each user
const finalStatement = baseUsers.reduce((acc, user) => {
const qb = knex.raw(`REPLACE(${acc}, ?, ?)`, [
user.id,
user.display_name || user.email,
]);
const qb = knex.raw(`REPLACE(${acc}, ?, ?)`, [user.id, user.email]);
return qb.toQuery();
}, knex.raw(`??`, [col.column_name]).toQuery());

Loading…
Cancel
Save