]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't include unindexed is_backup in the query, it's ensured by the user_id leading...
authorJoas Schilling <coding@schilljs.com>
Fri, 11 Feb 2022 13:37:09 +0000 (14:37 +0100)
committerJoas Schilling <coding@schilljs.com>
Tue, 15 Feb 2022 15:06:33 +0000 (16:06 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/user_status/lib/Db/UserStatusMapper.php

index 496cb5080f0bc061e2dbe6563cd18d1817b4ba3c..14671bf8c347ad1c1471e076971fd5cebffca83c 100644 (file)
@@ -101,8 +101,7 @@ class UserStatusMapper extends QBMapper {
                $qb
                        ->select('*')
                        ->from($this->tableName)
-                       ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)))
-                       ->andWhere($qb->expr()->eq('is_backup', $qb->createNamedParameter($isBackup, IQueryBuilder::PARAM_BOOL)));
+                       ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)));
 
                return $this->findEntity($qb);
        }