Commit 1b76ba54 authored by Valentin Samir's avatar Valentin Samir

[ressucite] Recherche d'un nouveau rid si celui du cimetière a été repris

parent 45c3f686
......@@ -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:
if "rid" in ldif and"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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment