[ldap_crans] Contrôle n'est plus différent des autres champs pour l'histo
This commit is contained in:
parent
5506680d62
commit
2b115d08d8
1 changed files with 3 additions and 10 deletions
|
@ -1254,16 +1254,9 @@ class BaseClasseCrans(CransLdap):
|
||||||
'debutConnexion', 'finConnexion', 'debutAdhesion',
|
'debutConnexion', 'finConnexion', 'debutAdhesion',
|
||||||
'finAdhesion']:
|
'finAdhesion']:
|
||||||
if champ in self.modifs:
|
if champ in self.modifs:
|
||||||
if champ == 'controle':
|
# Là, on bosse directement sur les listes renvoyées par get
|
||||||
# Ce n'est pas pareil que self._init_data.get('controle', [''])
|
ancien = self._init_data.get(champ, [])
|
||||||
# qui peut renvoyer une liste vide (petite erreur de choix
|
nouveau = self._data.get(champ, [])
|
||||||
# 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, [])
|
|
||||||
|
|
||||||
# On établit le diff
|
# On établit le diff
|
||||||
diff = ''.join([ '+%s' % decode(d) for d in nouveau if d not in ancien ])
|
diff = ''.join([ '+%s' % decode(d) for d in nouveau if d not in ancien ])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue