From cd92eced1363640535db96733c1148c98c0f9aa2 Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Thu, 11 Jan 2024 15:25:23 +0100 Subject: [PATCH] why not Signed-off-by: Marc 'risson' Schmitt --- authentik/tenants/apps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/authentik/tenants/apps.py b/authentik/tenants/apps.py index b3aef51a9..f08390300 100644 --- a/authentik/tenants/apps.py +++ b/authentik/tenants/apps.py @@ -27,7 +27,10 @@ class AuthentikTenantsConfig(ManagedAppConfig): verbose_name = "authentik Tenants" default = True + def ready(self): + post_migrate.connect(reconcile_default_tenant) + super().ready() + def reconcile_default_tenant(self): """Make sure default tenant exists, especially after a migration""" reconcile_default_tenant() - post_migrate.connect(reconcile_default_tenant)