From 5083ca16ad160f432a2b35247ac82abf4e938d26 Mon Sep 17 00:00:00 2001 From: Michel Blockelet Date: Tue, 18 Jan 2011 19:56:49 +0100 Subject: [PATCH] [gest_crans,whos] Correction comptes supprimes On evite de chier quand on a supprime le compte crans de quelqu'un et qu'on a '' comme adresse mail ... darcs-hash:20110118185649-ddb99-0f5297337aa6ba04615e7077ab19d695340458c2.gz --- gestion/gest_crans.py | 5 +++++ gestion/whos.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 6f11ca45..ad5adc52 100644 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -1630,6 +1630,11 @@ def modif_adher(adher): arg = u'--title "Modification de %s" ' % adher.Nom() arg += u'--msgbox "ERREUR : la chambre de cet adhérent est inconnue !\n\n\n" 0 0' dialog(arg) + elif adher.mail() == '': + res= ['Mail'] + arg = u'--title "Modification de %s" ' % adher.Nom() + arg += u'--msgbox "ERREUR : l\'adresse mail de cet adhérent est inconnue !\n\n\n" 0 0' + dialog(arg) else: payant = not isinstance(adher, Club) and adher.adherentPayant() diff --git a/gestion/whos.py b/gestion/whos.py index fe530684..afa5e507 100644 --- a/gestion/whos.py +++ b/gestion/whos.py @@ -400,9 +400,11 @@ def adher_details(adher) : # Mail GL = RMH = u'' - if adher.mail().find(u'@')!=-1 : + if adher.mail().find(u'@')!=-1 or adher.mail() == '': f += coul(u'Adresse mail : ','gras') - if adher.mail_invalide(): + if adher.mail() == '': + f += coul('INCONNUE','rouge') + elif adher.mail_invalide(): f += coul(adher.mail(),'rouge') else: f += adher.mail()