changeset 23e9dd752dc6 in trytond:5.4
details: https://hg.tryton.org/trytond?cmd=changeset;node=23e9dd752dc6
description:
Get session max_attempt as integer when deleting user application
issue9752
review304591002
(grafted from f6d3843711f6577257a85b5c5532f7038c793485)
diffstat:
trytond/res/routes.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 41edf2b0a50f -r 23e9dd752dc6 trytond/res/routes.py
--- a/trytond/res/routes.py Thu Oct 22 12:11:09 2020 +0200
+++ b/trytond/res/routes.py Sat Oct 24 23:17:19 2020 +0200
@@ -51,7 +51,7 @@
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)