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