mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(routers.packages): fix repeatead user joins
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
0df57debb8
commit
902c4d7a9c
1 changed files with 10 additions and 6 deletions
|
@ -59,13 +59,17 @@ class PackageSearch:
|
|||
"l": self._sort_by_last_modified
|
||||
}
|
||||
|
||||
self._joined = False
|
||||
|
||||
def _join_user(self, outer: bool = True) -> orm.Query:
|
||||
""" Centralized joining of a package base's maintainer. """
|
||||
if not self._joined:
|
||||
self.query = self.query.join(
|
||||
User,
|
||||
User.ID == PackageBase.MaintainerUID,
|
||||
isouter=outer
|
||||
)
|
||||
self._joined = True
|
||||
return self.query
|
||||
|
||||
def _search_by_namedesc(self, keywords: str) -> orm.Query:
|
||||
|
|
Loading…
Add table
Reference in a new issue