mail: send_template(): adh est optionnel

This commit is contained in:
Daniel STAN 2015-07-01 17:00:48 +02:00
parent 12e755fa64
commit 32136b25fa

View file

@ -252,7 +252,7 @@ class ServerConnection(object):
"""
From = data.get('from', '')
adh = data.get('adh', data.get('proprio', ''))
to = data.get('to', adh.get_mail())
to = data.get('to', None) or (adh.get_mail() if adh else None)
if to is None:
print "No valid recipient mail. Aborting."
return