This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/authentik/tenants/utils.py
Marc 'risson' Schmitt 5ede611f22
fix type
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2023-11-21 18:43:42 +01:00

10 lines
242 B
Python

"""Tenant utils"""
from django.db import connection
from authentik.tenants.models import Tenant
def get_current_tenant() -> Tenant:
"""Get tenant for current request"""
return Tenant.objects.get(schema_name=connection.schema_name)