Only try to populate the liaison user/email list from the from_entity if it's set.
- Legacy-Id: 2904
This commit is contained in:
parent
2ae5776024
commit
2b50bfdcef
|
@ -77,8 +77,11 @@ 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.sort(lambda x,y: cmp(x[1], y[1]))
|
||||
if from_entity:
|
||||
full_list = [(i.pk, i.email()) for i in from_entity.full_user_list()]
|
||||
full_list.sort(lambda x,y: cmp(x[1], y[1]))
|
||||
else:
|
||||
full_list = []
|
||||
full_list = [(person.pk, person.email())] + full_list
|
||||
result.update({'full_list': full_list})
|
||||
json_result = simplejson.dumps(result)
|
||||
|
|
Loading…
Reference in a new issue