utilise un context pour modifier l'adh
This commit is contained in:
parent
069ab9cc66
commit
6b74765a55
1 changed files with 3 additions and 2 deletions
|
@ -50,6 +50,7 @@ class Ticket(object):
|
||||||
login = adh['uid'][0].value
|
login = adh['uid'][0].value
|
||||||
try:
|
try:
|
||||||
value = gen_password()
|
value = gen_password()
|
||||||
|
with adh:
|
||||||
adh['userPassword'] = [crans_utils.hash_password(value).decode('ascii')]
|
adh['userPassword'] = [crans_utils.hash_password(value).decode('ascii')]
|
||||||
adh.save()
|
adh.save()
|
||||||
except EnvironmentError:
|
except EnvironmentError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue