Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2701 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mai. 22
34163
0
mar. 19
4192
0
jan. 19
5261
4
fev. 24
12513
3
mar. 18
7926