Skip to content

Commit

Permalink
root: fix app settings load order (#8569)
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu authored Feb 19, 2024
1 parent cb80b76 commit bc9a8c7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions authentik/root/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,6 @@ def _update_settings(app_path: str):
pass


# Load subapps's settings
for _app in set(SHARED_APPS + TENANT_APPS):
if not _app.startswith("authentik"):
continue
_update_settings(f"{_app}.settings")
_update_settings("data.user_settings")

if DEBUG:
CELERY["task_always_eager"] = True
os.environ[ENV_GIT_HASH_KEY] = "dev"
Expand All @@ -512,5 +505,13 @@ def _update_settings(app_path: str):
# being imported for @prefill_task
TENANT_APPS.append("authentik.events")


# Load subapps's settings
for _app in set(SHARED_APPS + TENANT_APPS):
if not _app.startswith("authentik"):
continue
_update_settings(f"{_app}.settings")
_update_settings("data.user_settings")

SHARED_APPS = list(OrderedDict.fromkeys(SHARED_APPS + TENANT_APPS))
INSTALLED_APPS = list(OrderedDict.fromkeys(SHARED_APPS + TENANT_APPS))

0 comments on commit bc9a8c7

Please sign in to comment.