From 2b115d08d8d48485c0925b8c3e7155d21a9345b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Thu, 25 Sep 2014 00:51:46 +0200 Subject: [PATCH] =?UTF-8?q?[ldap=5Fcrans]=20Contr=C3=B4le=20n'est=20plus?= =?UTF-8?q?=20diff=C3=A9rent=20des=20autres=20champs=20pour=20l'histo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/ldap_crans.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index b7ae6de4..b81a34c5 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -1254,16 +1254,9 @@ class BaseClasseCrans(CransLdap): 'debutConnexion', 'finConnexion', 'debutAdhesion', 'finAdhesion']: if champ in self.modifs: - if champ == 'controle': - # Ce n'est pas pareil que self._init_data.get('controle', ['']) - # qui peut renvoyer une liste vide (petite erreur de choix - # dans la première implémentation de controle) - ancien = (self._init_data.get('controle') or [''])[0] - nouveau = (self._data.get('controle') or [''])[0] - else: - # Là, on bosse directement sur les listes renvoyées par get - ancien = self._init_data.get(champ, []) - nouveau = self._data.get(champ, []) + # Là, on bosse directement sur les listes renvoyées par get + ancien = self._init_data.get(champ, []) + nouveau = self._data.get(champ, []) # On établit le diff diff = ''.join([ '+%s' % decode(d) for d in nouveau if d not in ancien ])