[SOGo] On patche un peu partout pour pouvoir rendre le champ mail de ldap plus propre.

Ignore-this: aed0fb0c7f88d3feb1f0be35b11780bf

darcs-hash:20121201132852-b6762-f77d73b568bc1ad0fef3c9341cb2a00a34a09a0c.gz
This commit is contained in:
Pierre-Elliott Bécue 2012-12-01 14:28:52 +01:00
parent e6777ccb12
commit ab6202f37c
5 changed files with 21 additions and 14 deletions

View file

@ -146,11 +146,15 @@ for item in tasks_to_treat:
if db_query['adherent']:
target = db_query['adherent'][0]
full_name = target.prenom() + u" " + target.nom()
send_to = [ target.mail() + u"@crans.org" ]
if not '@' in target.mail():
mail = target.mail() + '@crans.org'
else:
mail = target.mail()
send_to = [ mail ]
else:
target = db_query['club'][0]
full_name = u"Club " + target.nom()
send_to = map(lambda aid : db.search("aid=" + aid)['adherent'][0].mail() + u"@crans.org", target.imprimeurs())
send_to = map(lambda aid : db.search("aid=" + aid)['adherent'][0].mail(), target.imprimeurs())
historique = target.historique()
historique.reverse() # Ce qu'on cherche a des chances d'être récent et donc d'être à la fin de l'historique.
file_dirname = files_directory + user + r"/"