summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-30 06:08:33 +0200
committerDan McGee <dan@archlinux.org>2011-07-30 06:08:33 +0200
commit2a73675f0ed894d57ed13c5799e988f8d10ccfe2 (patch)
treeabb6c070a6f69aaa384cc13cc64319c72064df2b /main
parent82cb7c3586154da7196b513e349ea9c91efbc9ac (diff)
downloadarchweb-2a73675f0ed894d57ed13c5799e988f8d10ccfe2.tar.gz
archweb-2a73675f0ed894d57ed13c5799e988f8d10ccfe2.tar.xz
Select arch/repo for split package related fields
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r--main/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/models.py b/main/models.py
index 6e13481..7037282 100644
--- a/main/models.py
+++ b/main/models.py
@@ -307,12 +307,12 @@ class Package(models.Model):
"""
try:
# start by looking for something in this repo
- return Package.objects.get(arch=self.arch,
+ return Package.objects.normal().get(arch=self.arch,
repo=self.repo, pkgname=self.pkgbase)
except Package.DoesNotExist:
# this package might be split across repos? just find one
# that matches the correct [testing] repo flag
- pkglist = Package.objects.filter(arch=self.arch,
+ pkglist = Package.objects.normal().filter(arch=self.arch,
repo__testing=self.repo.testing,
repo__staging=self.repo.staging, pkgname=self.pkgbase)
if len(pkglist) > 0:
@@ -327,7 +327,7 @@ class Package(models.Model):
repo.testing and repo.staging flags. For any non-split packages, the
return value will be an empty list.
"""
- return Package.objects.filter(arch__in=self.applicable_arches(),
+ return Package.objects.normal().filter(arch__in=self.applicable_arches(),
repo__testing=self.repo.testing, repo__staging=self.repo.staging,
pkgbase=self.pkgbase).exclude(id=self.id)