From 279e3e970f500d809ecbdec112cf0c336233c9e9 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 22 Aug 2025 13:30:44 +0400 Subject: [PATCH] fix: redis session issue --- backend/open_webui/socket/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/socket/main.py b/backend/open_webui/socket/main.py index 49323db975..5570348093 100644 --- a/backend/open_webui/socket/main.py +++ b/backend/open_webui/socket/main.py @@ -266,7 +266,9 @@ async def connect(sid, environ, auth): user = Users.get_user_by_id(data["id"]) if user: - SESSION_POOL[sid] = user.model_dump() + SESSION_POOL[sid] = user.model_dump( + exclude=["date_of_birth", "bio", "gender"] + ) if user.id in USER_POOL: USER_POOL[user.id] = USER_POOL[user.id] + [sid] else: @@ -288,7 +290,7 @@ async def user_join(sid, data): if not user: return - SESSION_POOL[sid] = user.model_dump() + SESSION_POOL[sid] = user.model_dump(exclude=["date_of_birth", "bio", "gender"]) if user.id in USER_POOL: USER_POOL[user.id] = USER_POOL[user.id] + [sid] else: