Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2696 Vizualizări

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')}
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 22
34155
0
mar. 19
4185
0
ian. 19
5250
4
feb. 24
12493
3
mar. 18
7917