root: simplify task signal imports (#8454)

* *: deduplicate boilerplate for importing related models

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* also auto-import .checks

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix error during prometheus metrics from #8435

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-02-08 13:44:33 +01:00
committed by GitHub
parent c90792d876
commit ebd05be2c4
24 changed files with 31 additions and 95 deletions

View File

@ -69,7 +69,6 @@ TENANT_APPS = [
"authentik.admin",
"authentik.api",
"authentik.crypto",
"authentik.events",
"authentik.flows",
"authentik.outposts",
"authentik.policies.dummy",
@ -509,5 +508,9 @@ try:
except ImportError:
pass
# Import events after other apps since it relies on tasks and other things from all apps
# being imported for @prefill_task
TENANT_APPS.append("authentik.events")
SHARED_APPS = list(OrderedDict.fromkeys(SHARED_APPS + TENANT_APPS))
INSTALLED_APPS = list(OrderedDict.fromkeys(SHARED_APPS + TENANT_APPS))