[objets] Petits details sur history_gen
This commit is contained in:
parent
84cfaac84e
commit
f64cda3711
1 changed files with 3 additions and 3 deletions
|
@ -297,7 +297,7 @@ class CransLdapObject(object):
|
|||
def history_gen(self, attr=None, login=None):
|
||||
"Génère une ligne d'historique pour l'arribut attr ou une ligne par attributs pour l'objet courant"
|
||||
if attr is None:
|
||||
for attr in self.attrs.keys():
|
||||
for attr in self.keys():
|
||||
self.history_gen(attr)
|
||||
def partial_name(name, max_len=14, start=7, end=7):
|
||||
if len(name) > max_len:
|
||||
|
@ -318,8 +318,8 @@ class CransLdapObject(object):
|
|||
return
|
||||
if attr.historique not in ["full", "partial", "info"]:
|
||||
raise ValueError("Format d'historique %s inconnu" % attr.historique)
|
||||
old_values = self.attrs[attr.ldap_name]
|
||||
new_values = self._modifs[attr.ldap_name]
|
||||
old_values = self.attrs.get(attr.ldap_name, [])
|
||||
new_values = self._modifs.get(attr.ldap_name, [])
|
||||
if old_values == new_values:
|
||||
return
|
||||
comm = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue