From 428db553e289e2f5393ce1f78147db111bfe64e0 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 6 Aug 2025 14:27:07 +0400 Subject: [PATCH] refac --- backend/open_webui/main.py | 4 ++-- backend/open_webui/routers/scim.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 626d46be6b..71f13204db 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -658,8 +658,8 @@ app.state.config.ENABLE_DIRECT_CONNECTIONS = ENABLE_DIRECT_CONNECTIONS # ######################################## -app.state.config.SCIM_ENABLED = SCIM_ENABLED -app.state.config.SCIM_TOKEN = SCIM_TOKEN +app.state.SCIM_ENABLED = SCIM_ENABLED +app.state.SCIM_TOKEN = SCIM_TOKEN ######################################## # diff --git a/backend/open_webui/routers/scim.py b/backend/open_webui/routers/scim.py index 42fe6c716f..de1b979c86 100644 --- a/backend/open_webui/routers/scim.py +++ b/backend/open_webui/routers/scim.py @@ -256,7 +256,7 @@ def get_scim_auth( ) # Check if SCIM is enabled - scim_enabled = getattr(request.app.state.config, "SCIM_ENABLED", False) + scim_enabled = getattr(request.app.state, "SCIM_ENABLED", False) log.info( f"SCIM auth check - raw SCIM_ENABLED: {scim_enabled}, type: {type(scim_enabled)}" ) @@ -271,7 +271,7 @@ def get_scim_auth( ) # Verify the SCIM token - scim_token = getattr(request.app.state.config, "SCIM_TOKEN", None) + scim_token = getattr(request.app.state, "SCIM_TOKEN", None) # Handle both PersistentConfig and direct value if hasattr(scim_token, "value"): scim_token = scim_token.value