From 91dd33cee632921543e1e47fc800902f19fea37e Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 5 Jan 2022 22:06:20 +0100 Subject: [PATCH] policies/reputation: trigger save on update Signed-off-by: Jens Langhammer --- authentik/policies/reputation/signals.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/policies/reputation/signals.py b/authentik/policies/reputation/signals.py index 536a0876d..e1471f937 100644 --- a/authentik/policies/reputation/signals.py +++ b/authentik/policies/reputation/signals.py @@ -8,6 +8,7 @@ from structlog.stdlib import get_logger from authentik.lib.config import CONFIG from authentik.lib.utils.http import get_client_ip from authentik.policies.reputation.models import CACHE_KEY_PREFIX +from authentik.policies.reputation.tasks import save_reputation from authentik.stages.identification.signals import identification_failed LOGGER = get_logger() @@ -31,6 +32,7 @@ def update_score(request: HttpRequest, identifier: str, amount: int): LOGGER.warning("failed to set reputation", exc=exc) LOGGER.debug("Updated score", amount=amount, for_user=identifier, for_ip=remote_ip) + save_reputation.delay() @receiver(user_login_failed)