From 9412ca2803d7106cb3abfe6176fc9ccd63e60b6e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 27 Apr 2010 18:45:29 -0500 Subject: Dedupe entries in required by list Use distinct() on a query. Fixes FS#19195. 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 5e376ec9..1f938cc5 100644 --- a/main/models.py +++ b/main/models.py @@ -209,7 +209,7 @@ def get_requiredby(self): """ requiredby = Package.objects.select_related('arch', 'repo').filter( packagedepend__depname=self.pkgname, - arch__name__in=(self.arch.name, 'any')) + arch__name__in=(self.arch.name, 'any')).distinct() return requiredby.order_by('pkgname') def get_depends(self): -- cgit v1.2.3-54-g00ecf