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)