utilise un context pour modifier l'adh

This commit is contained in:
Daniel STAN 2014-09-20 15:37:34 +02:00
parent 069ab9cc66
commit 6b74765a55

View file

@ -50,6 +50,7 @@ class Ticket(object):
login = adh['uid'][0].value
try:
value = gen_password()
with adh:
adh['userPassword'] = [crans_utils.hash_password(value).decode('ascii')]
adh.save()
except EnvironmentError: