From 592394a030bd2a8cec023606456666ff5fc3ec61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Wed, 29 Jan 2014 00:56:04 +0100 Subject: [PATCH] =?UTF-8?q?[objets]=20Arriv=C3=A9e=20de=20gpgMail=20dans?= =?UTF-8?q?=20les=20attributs=20des=20adherents,=20et=20petite=20correctio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Petite correction : Quand on est en mode write, on get dans _modifs, mais on vérifiait pas avec un has_key qu'on pouvait bien. --- objets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/objets.py b/objets.py index fd0844b..ee30071 100644 --- a/objets.py +++ b/objets.py @@ -356,7 +356,7 @@ class CransLdapObject(object): return default def __getitem__(self, attr): - if self.mode in [ 'w', 'rw' ]: + if self._modifs.has_key(attr) and self.mode in [ 'w', 'rw' ]: return [ v for v in self._modifs[attr] ] elif self.attrs.has_key(attr): return [ v for v in self.attrs[attr] ] @@ -805,6 +805,7 @@ class adherent(proprio): attributs.derniereConnexion, attributs.gpgFingerprint, attributs.carteEtudiant, attributs.droits, attributs.etudes, attributs.postalAddress, attributs.mailExt, attributs.compteWiki, + attributs.gpgMail, ] ldap_name = "adherent"