Skip to Content
Menú
This question has been flagged
2682 Vistes

Good morning,

Please how I want to capture Access Denied error , but it is not working.

How can I handle this exception AccessDenied

Thank you.

try:
if req.session.model('res.users').change_password(
old_password, new_password):
return {'new_password':new_password}
except PassError as e:
return {'error': (e.message), 'title': ('Change Password')}
except AccessDenied, e:
return {'error': (e.message), 'title': ('Access Denied')}
Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de maig 22
34133
0
de març 19
4181
0
de gen. 19
5246
4
de febr. 24
12491
3
de març 18
7913