tenants: fix fallback for unittests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
e9621bae06
commit
7b39718bd1
|
@ -23,8 +23,9 @@ def get_tenant_for_request(request: HttpRequest) -> Tenant:
|
||||||
|
|
||||||
def context_processor(request: HttpRequest) -> dict[str, Any]:
|
def context_processor(request: HttpRequest) -> dict[str, Any]:
|
||||||
"""Context Processor that injects tenant object into every template"""
|
"""Context Processor that injects tenant object into every template"""
|
||||||
|
tenant = getattr(request, "tenant", Tenant(domain="fallback"))
|
||||||
return {
|
return {
|
||||||
"tenant": request.tenant,
|
"tenant": tenant,
|
||||||
"ak_version": __version__,
|
"ak_version": __version__,
|
||||||
"footer_links": CONFIG.y("authentik.footer_links"),
|
"footer_links": CONFIG.y("authentik.footer_links"),
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue