summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-29 23:08:33 -0500
committerDan McGee <dan@archlinux.org>2011-07-29 23:08:33 -0500
commit2a73675f0ed894d57ed13c5799e988f8d10ccfe2 (patch)
treeabb6c070a6f69aaa384cc13cc64319c72064df2b /main
parent82cb7c3586154da7196b513e349ea9c91efbc9ac (diff)
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 6e134810..70372823 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)