all: fix left over references to error templates

This commit is contained in:
Jens Langhammer
2020-02-21 15:04:37 +01:00
parent b6326f399c
commit e2f836feae
7 changed files with 20 additions and 96 deletions

View File

@ -14,6 +14,7 @@ from passbook.core.views.utils import PermissionDeniedView
from passbook.lib.config import CONFIG
from passbook.lib.utils.reflection import class_to_path, path_to_class
from passbook.lib.utils.urls import is_url_absolute
from passbook.lib.views import bad_request_message
from passbook.policies.engine import PolicyEngine
LOGGER = get_logger()
@ -62,9 +63,7 @@ class AuthenticationView(UserPassesTestMixin, View):
f"match configured domain of '{config_domain}'."
)
LOGGER.warning(message)
return render(
self.request, "error/400.html", context={"message": message}, status=400
)
return bad_request_message(self.request, message)
return None
def handle_no_permission(self) -> HttpResponse: