Skip to content

Commit 2b50bfd

Browse files
committed
Only try to populate the liaison user/email list from the from_entity if it's set.
- Legacy-Id: 2904
1 parent 2ae5776 commit 2b50bfd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ietf/liaisons/views.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ def get_info(request):
7777
'needs_approval': from_entity.needs_approval(person=person),
7878
'post_only': from_entity.post_only(person=person, user=request.user)})
7979
if is_secretariat(request.user):
80-
full_list = [(i.pk, i.email()) for i in from_entity.full_user_list()]
81-
full_list.sort(lambda x,y: cmp(x[1], y[1]))
80+
if from_entity:
81+
full_list = [(i.pk, i.email()) for i in from_entity.full_user_list()]
82+
full_list.sort(lambda x,y: cmp(x[1], y[1]))
83+
else:
84+
full_list = []
8285
full_list = [(person.pk, person.email())] + full_list
8386
result.update({'full_list': full_list})
8487
json_result = simplejson.dumps(result)

0 commit comments

Comments
 (0)