[ressucite] Recherche d'un nouveau rid si celui du cimetière a été repris
This commit is contained in:
parent
45c3f68635
commit
1b76ba5420
1 changed files with 5 additions and 0 deletions
|
@ -181,6 +181,11 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
||||||
dn="%s=%s,%s" % (id, ldif[id][0], dn.split(',',1)[1])
|
dn="%s=%s,%s" % (id, ldif[id][0], dn.split(',',1)[1])
|
||||||
except ldap.NO_SUCH_OBJECT:
|
except ldap.NO_SUCH_OBJECT:
|
||||||
pass
|
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 = self._create_entity(dn, ldif_to_uldif(ldif), lockId)
|
||||||
obj.history_add(login, u"resurrection")
|
obj.history_add(login, u"resurrection")
|
||||||
return obj
|
return obj
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue