From a4dedbb335c17f62bdf3e197f6e43f362f80aaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Mon, 21 Oct 2013 20:05:06 +0200 Subject: [PATCH] =?UTF-8?q?[gest=5Fcrans]=20En=20fait,=20=C3=A7a=20marche?= =?UTF-8?q?=20mieux=20quand=20on=20corrige=20les=20erreurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/gest_crans.py | 4 ++-- gestion/ldap_crans.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 8588d692..0cc4028b 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -650,13 +650,13 @@ def set_actif(adher): Définition de l'état d'activité du compte. """ # Initialisation des différentes checkbox - inactif = on_off("0" in adher.active()) + inactif = on_off(adher.active() == False) # Construction de la boîte de dialogue texte = [] checklist = [] - if state: + if inactif: checklist.append(u'"1" "Compte mail/serveur désactivé" "%s"' % (inactif)) # Il y a qqch de modifiable, on construit la checklist diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 79d92340..77e3a1cd 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -2458,13 +2458,13 @@ class Adherent(BaseProprietaire): if self.compte() == '': raise EnvironmentError("Can't deactivate non-existing account") if status == None: - return not (self._data.get("setExpire", [""])[0] == "0") + return not (self._data.get("shadowExpire", [""])[0] == "0") elif status == False: - self._set('setExpire', ["0"]) + self._set('shadowExpire', ["0"]) else: - self._set('setExpire', []) + self._set('shadowExpire', []) - return not (self._data.get("setExpire", [""])[0] == "0") + return not (self._data.get("shadowExpire", [""])[0] == "0") def canonical_alias(self, new=None): """ Retourne ou défini l'alias canonique"""