From c94e381bb7a7a0c7fee94522e2e0c33e62d5b913 Mon Sep 17 00:00:00 2001 From: Matthew Schinckel Date: Thu, 17 Nov 2016 16:23:42 +1030 Subject: [PATCH] Only look for lockable users on a POST. Resolves #205. --- axes/decorators.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/axes/decorators.py b/axes/decorators.py index 1b6005f..d835267 100644 --- a/axes/decorators.py +++ b/axes/decorators.py @@ -94,6 +94,9 @@ def is_user_lockable(request): If so, then return the value to see if this user is special and doesn't get their account locked out """ + if request.method != 'POST': + return False + try: field = getattr(get_user_model(), 'USERNAME_FIELD', 'username') kwargs = {