summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-27 23:37:49 +0100
committerDan McGee <dan@archlinux.org>2012-12-27 23:37:49 +0100
commit2b68963ad1049f4b0198bed6da16e385aedc119e (patch)
treeb25b357d717064b400dc105629e1dc613b1e4dc2
parent724422850020fd556e77026e54bfb56aa595eddc (diff)
downloadarchweb-2b68963ad1049f4b0198bed6da16e385aedc119e.tar.gz
archweb-2b68963ad1049f4b0198bed6da16e385aedc119e.tar.xz
Ensure mirror protocols are distinct
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--mirrors/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mirrors/views.py b/mirrors/views.py
index d0ce0a9..22da631 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -161,7 +161,7 @@ def mirrors(request):
mirror_list = Mirror.objects.select_related().order_by('tier', 'country')
protos = MirrorUrl.objects.values_list(
'mirror_id', 'protocol__protocol').order_by(
- 'mirror__id', 'protocol__protocol')
+ 'mirror__id', 'protocol__protocol').distinct()
if not request.user.is_authenticated():
mirror_list = mirror_list.filter(public=True, active=True)
protos = protos.filter(mirror__public=True, mirror__active=True)