summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-04-28 01:45:29 +0200
committerDan McGee <dan@archlinux.org>2010-04-28 01:45:29 +0200
commit9412ca2803d7106cb3abfe6176fc9ccd63e60b6e (patch)
treeacacf6a862288aecbb8e03a1c55469592b2c736a
parent0f383fa3cdc80d83843be838f3a2520f37e19473 (diff)
downloadarchweb-9412ca2803d7106cb3abfe6176fc9ccd63e60b6e.tar.gz
archweb-9412ca2803d7106cb3abfe6176fc9ccd63e60b6e.tar.xz
Dedupe entries in required by list
Use distinct() on a query. Fixes FS#19195. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--main/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index 5e376ec..1f938cc 100644
--- a/main/models.py
+++ b/main/models.py
@@ -209,7 +209,7 @@ class Package(models.Model):
"""
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):