mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
routers.packages: Simplify some existence checks
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
bace345da4
commit
4ade8b0539
6 changed files with 48 additions and 43 deletions
|
@ -69,4 +69,4 @@ class PackageDependency(Base):
|
|||
pkg = db.query(Package, Package.Name == self.DepName)
|
||||
official = db.query(OfficialProvider,
|
||||
OfficialProvider.Name == self.DepName)
|
||||
return pkg.count() > 0 or official.count() > 0
|
||||
return pkg.scalar() or official.scalar()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue