Fix annoying duplicate entry bug in the from list for a Secretariat person

- Legacy-Id: 3351
This commit is contained in:
Ole Laursen 2011-08-22 23:16:32 +00:00
parent b9e1753ef6
commit 2bbe307c05

View file

@ -80,7 +80,7 @@ def get_info(request):
'needs_approval': from_entity.needs_approval(person=person),
'post_only': from_entity.post_only(person=person, user=request.user)})
if is_secretariat(request.user):
full_list = [(i.pk, i.email()) for i in from_entity.full_user_list()]
full_list = [(i.pk, i.email()) for i in set(from_entity.full_user_list())]
full_list.sort(lambda x,y: cmp(x[1], y[1]))
full_list = [(person.pk, person.email())] + full_list
result.update({'full_list': full_list})