Return a person search string instead of bombing out if there are multiple identical names where one don't have an active email address.
- Legacy-Id: 13245
This commit is contained in:
parent
67bfcda880
commit
4803be0c03
|
@ -17,7 +17,7 @@ def select2_id_name_json(objs):
|
|||
return escape(u"%s <%s>" % (e.person.name, e.address))
|
||||
def format_person(p):
|
||||
if p.name_count > 1:
|
||||
return escape('%s (%s)' % (p.name,p.email().address))
|
||||
return escape('%s (%s)' % (p.name,p.email().address if p.email() else 'no email address'))
|
||||
else:
|
||||
return escape(p.name)
|
||||
|
||||
|
|
Loading…
Reference in a new issue