Only look for lockable users on a POST.

Resolves #205.
This commit is contained in:
Matthew Schinckel 2016-11-17 16:23:42 +10:30
parent ef3d527bee
commit c94e381bb7

View file

@ -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 = {