From a81f9814715bc12f6a5facae5c95639f0e052c5e Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 1 Mar 2021 11:11:00 +0100 Subject: [PATCH] lib: fix being unable to set authentik. options --- authentik/lib/config.py | 4 +++- authentik/providers/saml/api.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/authentik/lib/config.py b/authentik/lib/config.py index 5e9f912a6..033d2431f 100644 --- a/authentik/lib/config.py +++ b/authentik/lib/config.py @@ -114,7 +114,9 @@ class ConfigLoader: for key, value in os.environ.items(): if not key.startswith(ENV_PREFIX): continue - relative_key = key.replace(f"{ENV_PREFIX}_", "").replace("__", ".").lower() + relative_key = ( + key.replace(f"{ENV_PREFIX}_", "", 1).replace("__", ".").lower() + ) # Recursively convert path from a.b.c into outer[a][b][c] current_obj = outer dot_parts = relative_key.split(".") diff --git a/authentik/providers/saml/api.py b/authentik/providers/saml/api.py index 475e1b0b0..10356f600 100644 --- a/authentik/providers/saml/api.py +++ b/authentik/providers/saml/api.py @@ -2,7 +2,6 @@ from drf_yasg2.utils import swagger_auto_schema from rest_framework.decorators import action from rest_framework.fields import ReadOnlyField -from rest_framework.generics import get_object_or_404 from rest_framework.request import Request from rest_framework.response import Response from rest_framework.serializers import ModelSerializer, Serializer