lib: fix being unable to set authentik. options

This commit is contained in:
Jens Langhammer 2021-03-01 11:11:00 +01:00
parent d6fd2b0afa
commit a81f981471
2 changed files with 3 additions and 2 deletions

View file

@ -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(".")

View file

@ -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