tenants: fix fallback for unittests

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-03 22:40:01 +02:00
parent e9621bae06
commit 7b39718bd1
1 changed files with 2 additions and 1 deletions

View File

@ -23,8 +23,9 @@ def get_tenant_for_request(request: HttpRequest) -> Tenant:
def context_processor(request: HttpRequest) -> dict[str, Any]:
"""Context Processor that injects tenant object into every template"""
tenant = getattr(request, "tenant", Tenant(domain="fallback"))
return {
"tenant": request.tenant,
"tenant": tenant,
"ak_version": __version__,
"footer_links": CONFIG.y("authentik.footer_links"),
}