policies/reputation: only change score when credentials contain username
This commit is contained in:
parent
5644e57e6a
commit
8c500c38b1
|
@ -32,6 +32,7 @@ def update_score(request: HttpRequest, username: str, amount: int):
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def handle_failed_login(sender, request, credentials, **_):
|
def handle_failed_login(sender, request, credentials, **_):
|
||||||
"""Lower Score for failed loging attempts"""
|
"""Lower Score for failed loging attempts"""
|
||||||
|
if "username" in credentials:
|
||||||
update_score(request, credentials.get("username"), -1)
|
update_score(request, credentials.get("username"), -1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue