From fc9aefe104cf2cdd352dd11cf987cb0efe39f3bc Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Sat, 24 Oct 2020 23:17:19 +0200 Subject: [PATCH] Get session max_attempt as integer when deleting user application issue9752 review304591002 --- trytond/res/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/res/routes.py b/trytond/res/routes.py index 6a4615f146..29402736da 100644 --- a/trytond/res/routes.py +++ b/trytond/res/routes.py @@ -51,7 +51,7 @@ def user_application(request, pool): return key elif request.method == 'DELETE': count = LoginAttempt.count(login) - if count > config.get('session', 'max_attempt', default=5): + if count > config.getint('session', 'max_attempt', default=5): LoginAttempt.add(login) abort(429) Transaction().atexit(time.sleep, 2 ** count - 1)