From d2df8cac78d930a59ebf56c6ddfaf26b1c374665 Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz
Date: Tue, 1 Oct 2013 13:42:30 +0000
Subject: [PATCH] Fixed the manyfold duplicated position names in the position
selection drop-down list in the nomcom private index page. Fixes issue
#1137. - Legacy-Id: 6327
---
ietf/nomcom/views.py | 5 +----
ietf/templates/nomcom/private_index.html | 6 +++---
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/ietf/nomcom/views.py b/ietf/nomcom/views.py
index 74abc650d..8b4ec220c 100644
--- a/ietf/nomcom/views.py
+++ b/ietf/nomcom/views.py
@@ -40,12 +40,10 @@ def index(request):
nomcom_list = Group.objects.filter(type__slug='nomcom').order_by('acronym')
for nomcom in nomcom_list:
year = nomcom.acronym[6:]
- debug.show('year')
try:
year = int(year)
except ValueError:
year = None
- debug.show('year')
nomcom.year = year
nomcom.label = "%s/%s" % (year, year+1)
if year in [ 2005, 2006, 2007, 2008, 2009, 2010 ]:
@@ -60,7 +58,6 @@ def index(request):
nomcom.ann_url = "/ann/nomcom/#%4d" % year
else:
nomcom.ann_url = None
- debug.show('nomcom.url')
return render_to_response('nomcom/index.html',
{'nomcom_list': nomcom_list,}, RequestContext(request))
@@ -145,7 +142,7 @@ def private_index(request, year):
stats = all_nominee_positions.values('position__name', 'position__id').annotate(total=Count('position'))
states = list(NomineePositionState.objects.values('slug', 'name')) + [{'slug': questionnaire_state, 'name': u'Questionnaire'}]
- positions = all_nominee_positions.values('position__name', 'position__id').distinct()
+ positions = set([ n.position for n in all_nominee_positions.order_by('position__name') ])
for s in stats:
for state in states:
if state['slug'] == questionnaire_state:
diff --git a/ietf/templates/nomcom/private_index.html b/ietf/templates/nomcom/private_index.html
index ecb2745df..7c7319334 100644
--- a/ietf/templates/nomcom/private_index.html
+++ b/ietf/templates/nomcom/private_index.html
@@ -61,9 +61,9 @@ replied to the nomination notification they have received.){% endif %}