diff --git a/objets.py b/objets.py index 01fd579..64295bc 100644 --- a/objets.py +++ b/objets.py @@ -611,6 +611,9 @@ class CransLdapObject(object): for attribut in self._modifs.get(attr, []): if attribut.unique and not attribut in attrs_before_verif and not attribut in attribut.unique_exclue: self.conn.lockholder.removelock(attr, str(attribut), self.lockId) + # Si on remet la valeur antérieure au lock, on le libère + if not attribut.concurent and self._modifs.get(attr, []) != self.attrs.get(attr, []) and attrs_before_verif == self.attrs.get(attr, []): + self.conn.lockholder.removelock("dn", "%s_%s" % (self.dn.replace('=', '-').replace(',','_'), attr), self.lockId) # On met à jour self._modifs avec les nouvelles valeurs self._modifs[attr] = attrs_before_verif