Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2686 Widoki

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')}
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
maj 22
34145
0
mar 19
4182
0
sty 19
5246
4
lut 24
12491
3
mar 18
7916