From de0cbb9073298f579e0d4b9e5340b266f474acec Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 12 Jan 2026 21:56:02 +0400 Subject: [PATCH] refac --- backend/open_webui/models/groups.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/models/groups.py b/backend/open_webui/models/groups.py index f1ece68aa..31b34c45c 100644 --- a/backend/open_webui/models/groups.py +++ b/backend/open_webui/models/groups.py @@ -165,14 +165,15 @@ class GroupTable: share_value = filter["share"] member_id = filter.get("member_id") json_share = Group.data["config"]["share"] - json_share_lower = func.lower(json_share.as_string()) + json_share_str = json_share.as_string() + json_share_lower = func.lower(json_share_str) if share_value: # Groups open to anyone: data is null, config.share is null, or share is true # Use case-insensitive string comparison to handle variations like "True", "TRUE" anyone_can_share = or_( Group.data.is_(None), - json_share_lower.is_(None), + json_share_str.is_(None), json_share_lower == "true", )