From a2643566b6f2edc3039bfdaf095626a6dea0aba6 Mon Sep 17 00:00:00 2001 From: dettlaff Date: Thu, 12 Dec 2024 02:00:43 +0400 Subject: [PATCH] fix: recursion now really --- selfprivacy_api/repositories/users/kanidm_user_repository.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/selfprivacy_api/repositories/users/kanidm_user_repository.py b/selfprivacy_api/repositories/users/kanidm_user_repository.py index 2b50316..45b81ee 100644 --- a/selfprivacy_api/repositories/users/kanidm_user_repository.py +++ b/selfprivacy_api/repositories/users/kanidm_user_repository.py @@ -128,7 +128,7 @@ class KanidmAdminToken: response = requests.get( "{KANIDM_URL}/v1/person/root", headers={ - "Authorization": f"Bearer {KanidmAdminToken.get()}", + "Authorization": f"Bearer {token}", "Content-Type": "application/json", }, timeout=1, @@ -222,14 +222,13 @@ class KanidmUserRepository(AbstractUserRepository): raise ValueError(f"Unsupported HTTP method: {method}") full_endpoint = f"{KANIDM_URL}/v1/{endpoint}" - kanidm_token = KanidmAdminToken.get() try: response = request_method( full_endpoint, json=data, headers={ - "Authorization": f"Bearer {kanidm_token}", + "Authorization": f"Bearer {KanidmAdminToken.get()}", "Content-Type": "application/json", }, timeout=1,