summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-28 21:52:09 +0100
committerDan McGee <dan@archlinux.org>2012-12-28 21:52:09 +0100
commitabe02e3a2a6cf4fd4b0b82c2a1dd4259a9a5debe (patch)
treee1796168e69c53c941334fa8eaae6a4389a37da8 /main
parentee507a5b81d7a21eaa67da4c848522a5a97d2e3c (diff)
downloadarchweb-abe02e3a2a6cf4fd4b0b82c2a1dd4259a9a5debe.tar.gz
archweb-abe02e3a2a6cf4fd4b0b82c2a1dd4259a9a5debe.tar.xz
Retrieve arch and repo too when calling reverse_conflicts
Since we need these in the template for any details links, we might as well pull them back from the database in one query rather than three. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r--main/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index ba24645..7ec04ad 100644
--- a/main/models.py
+++ b/main/models.py
@@ -288,7 +288,7 @@ class Package(models.Model):
"""
Returns a list of packages with conflicts against this package.
"""
- pkgs = Package.objects.filter(conflicts__name=self.pkgname)
+ pkgs = Package.objects.normal().filter(conflicts__name=self.pkgname)
if not self.arch.agnostic:
# make sure we match architectures if possible
pkgs = pkgs.filter(arch__in=self.applicable_arches())