From f265c1f10bb177e92ce835c4fb782451cda289ab Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 17 Dec 2020 19:03:32 +0100 Subject: [PATCH] admin: fix cache clean views erroring --- authentik/admin/views/overview.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/authentik/admin/views/overview.py b/authentik/admin/views/overview.py index 6447279e5..2e216d8ce 100644 --- a/authentik/admin/views/overview.py +++ b/authentik/admin/views/overview.py @@ -3,7 +3,6 @@ from django.contrib.messages.views import SuccessMessageMixin from django.core.cache import cache from django.http.request import HttpRequest from django.http.response import HttpResponse -from django.urls import reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import FormView from structlog import get_logger @@ -20,7 +19,7 @@ class PolicyCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView): form_class = PolicyCacheClearForm template_name = "generic/form_non_model.html" - success_url = reverse_lazy("authentik_admin:overview") + success_url = "/" success_message = _("Successfully cleared Policy cache") def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: @@ -36,7 +35,7 @@ class FlowCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView): form_class = FlowCacheClearForm template_name = "generic/form_non_model.html" - success_url = reverse_lazy("authentik_admin:overview") + success_url = "/" success_message = _("Successfully cleared Flow cache") def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: