diff --git a/gestion/restore.py b/gestion/restore.py index 3737e55d..0a536f41 100755 --- a/gestion/restore.py +++ b/gestion/restore.py @@ -62,7 +62,6 @@ def restore_adher(adh) : adh._data['mail'] = [] all(adh) - def restore_machine(machine) : try : obj.proprio # crash si l'adhérent est encore dans la base @@ -71,7 +70,7 @@ def restore_machine(machine) : t = t.lower() if t in 'ac' : i = prompt("Entrez l'%sid auquel ratacher la machine : %sid =" % (t,t) ) - machine.dn = '%sid=%s,%s' % (t, i, machine.dn ) + machine.dn = '%sid=%s,%s' % (t, i, machine.dn.split(',',1)[1] ) except : pass set_machine(machine) @@ -83,7 +82,8 @@ def restore_club(club) : q = prompt('Restaurer cette entrée ? [O/N]') if q not in 'oO' : sys.exit(0) - + +obj.connect() # Reconnection à la base LDAP if obj.idn == 'aid' : restore_adher(obj) elif obj.idn == 'mid' :