Skip to content

Commit

Permalink
fix select for userRole #3394
Browse files Browse the repository at this point in the history
  • Loading branch information
dartcafe authored May 30, 2024
1 parent e1bc1b9 commit 78b076c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Db/PollMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected function buildQuery(): IQueryBuilder {
*/
protected function joinUserRole(IQueryBuilder &$qb, string $fromAlias, string $currentUserId): void {
$joinAlias = 'shares';
$qb->addSelect($qb->createFunction('coalesce(' . $joinAlias . '.type, "") AS user_role'))
$qb->addSelect($qb->createFunction('coalesce(' . $joinAlias . '.type, ' . $qb->expr()->literal('') . ') AS user_role'))
->addGroupBy($joinAlias . '.type');

$qb->selectAlias($joinAlias . '.locked', 'is_current_user_locked')
Expand Down

0 comments on commit 78b076c

Please sign in to comment.