From abe02e3a2a6cf4fd4b0b82c2a1dd4259a9a5debe Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 28 Dec 2012 14:52:09 -0600 Subject: 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 --- main/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') 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()) -- cgit v1.2.3-24-g4f1b