deconnexion2: ne caste plus get_mail() en unicode
S'il existe un mail valide, c'est déjà un unicode, sinon, c'est None, et il ne faut pas le transformer en u"None".
This commit is contained in:
parent
22bf89eef0
commit
d58b92b957
1 changed files with 2 additions and 2 deletions
|
@ -227,7 +227,7 @@ def upload_hard(proprio, elupload, elid, eltype, curseur, ldap):
|
||||||
|
|
||||||
mail_data = {
|
mail_data = {
|
||||||
'from': upload.expediteur,
|
'from': upload.expediteur,
|
||||||
'to': unicode(proprio.get_mail()),
|
'to': proprio.get_mail(),
|
||||||
'upload': "%.2f" % (elupload,),
|
'upload': "%.2f" % (elupload,),
|
||||||
'proprio': proprio,
|
'proprio': proprio,
|
||||||
'lang_info': 'English version below',
|
'lang_info': 'English version below',
|
||||||
|
@ -325,7 +325,7 @@ def upload_soft(proprio, elupload, elid, eltype, curseur):
|
||||||
with mail_module.ServerConnection() as smtp_connect:
|
with mail_module.ServerConnection() as smtp_connect:
|
||||||
mail_data = {
|
mail_data = {
|
||||||
'from': upload.expediteur,
|
'from': upload.expediteur,
|
||||||
'to': unicode(proprio.get_mail()),
|
'to': proprio.get_mail(),
|
||||||
'upload': "%.2f" % (elupload,),
|
'upload': "%.2f" % (elupload,),
|
||||||
'proprio': proprio,
|
'proprio': proprio,
|
||||||
'lang_info':'English version below',
|
'lang_info':'English version below',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue