Skip to content

Commit 658547d

Browse files
committed
Don't include unindexed is_backup in the query, it's ensured by the user_id leading underscore already
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent deec4f3 commit 658547d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/user_status/lib/Db/UserStatusMapper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ public function findByUserId(string $userId, bool $isBackup = false):UserStatus
101101
$qb
102102
->select('*')
103103
->from($this->tableName)
104-
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)))
105-
->andWhere($qb->expr()->eq('is_backup', $qb->createNamedParameter($isBackup, IQueryBuilder::PARAM_BOOL)));
104+
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)));
106105

107106
return $this->findEntity($qb);
108107
}

0 commit comments

Comments
 (0)