Browse Source

fix: use user email for formula

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/7202/head
mertmit 11 months 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 // create nested replace statement for each user
const finalStatement = baseUsers.reduce((acc, user) => { const finalStatement = baseUsers.reduce((acc, user) => {
const qb = knex.raw(`REPLACE(${acc}, ?, ?)`, [ const qb = knex.raw(`REPLACE(${acc}, ?, ?)`, [user.id, user.email]);
user.id,
user.display_name || user.email,
]);
return qb.toQuery(); return qb.toQuery();
}, knex.raw(`??`, [col.column_name]).toQuery()); }, knex.raw(`??`, [col.column_name]).toQuery());

Loading…
Cancel
Save