From 3897336b48e8416c32a9a7dbedce43d5f0ea4618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Fri, 20 Feb 2015 20:57:28 +0100 Subject: [PATCH] =?UTF-8?q?On=20n'ex=C3=A9cute=20le=20code=20dans=20suppri?= =?UTF-8?q?mer=5Fcompte=20que=20si=20l'adh=C3=A9rent=20en=20a=20bien=20un.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/ldap_crans.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index c31af4ec..c17bb68e 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -2430,6 +2430,8 @@ class Adherent(BaseProprietaire): """ Supprime le compte sur zamok. Penser à définir l'adresse mail après. """ + if not self.compte(): + return self._set('mail', ['']) if abs(self.solde()) >= 0.01: raise ValueError(u"Le solde d'un adhérent doit être nul pour supprimer son compte crans.")