From 1b76ba542041c4a0b7a2cf742d6b2f688c77b40a Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sun, 9 Nov 2014 16:50:11 +0100 Subject: [PATCH] =?UTF-8?q?[ressucite]=20Recherche=20d'un=20nouveau=20rid?= =?UTF-8?q?=20si=20celui=20du=20cimeti=C3=A8re=20a=20=C3=A9t=C3=A9=20repri?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc_ldap.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lc_ldap.py b/lc_ldap.py index b2f7f34..1f3a05e 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -181,6 +181,11 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object): dn="%s=%s,%s" % (id, ldif[id][0], dn.split(',',1)[1]) except ldap.NO_SUCH_OBJECT: pass + if "rid" in ldif and self.search(u"rid=%s" % ldif["rid"][0]): + realm = crans_utils.find_rid_plage(int(ldif["rid"][0]))[0] + ldif["rid"]=[str(self._find_id("rid", realm=realm, lockId=lockId))] + ldif['ipHostNumber'] = [ str(crans_utils.ip4_of_rid(int(ldif["rid"][0]))) ] + obj = self._create_entity(dn, ldif_to_uldif(ldif), lockId) obj.history_add(login, u"resurrection") return obj