fix reconcile
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
parent
04ae26c1ba
commit
f7b609d8aa
|
@ -59,7 +59,14 @@ class ManagedAppConfig(AppConfig):
|
||||||
|
|
||||||
def reconcile(self) -> None:
|
def reconcile(self) -> None:
|
||||||
"""reconcile ourselves"""
|
"""reconcile ourselves"""
|
||||||
from django_tenants.utils import get_public_schema_name
|
from django_tenants.utils import get_public_schema_name, schema_context
|
||||||
|
|
||||||
|
# Special case for the authentik_tenants app, as we need to create the default tenant
|
||||||
|
# before being able to use it
|
||||||
|
if self.label == "authentik_tenants":
|
||||||
|
with schema_context(get_public_schema_name()):
|
||||||
|
self._reconcile(self.RECONCILE_PREFIX)
|
||||||
|
return
|
||||||
|
|
||||||
from authentik.tenants.models import Tenant
|
from authentik.tenants.models import Tenant
|
||||||
|
|
||||||
|
|
Reference in New Issue