Skip to content

Commit de0cbb9

Browse files
committed
refac
1 parent 5a075a2 commit de0cbb9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/open_webui/models/groups.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,15 @@ def get_groups(self, filter, db: Optional[Session] = None) -> list[GroupResponse
165165
share_value = filter["share"]
166166
member_id = filter.get("member_id")
167167
json_share = Group.data["config"]["share"]
168-
json_share_lower = func.lower(json_share.as_string())
168+
json_share_str = json_share.as_string()
169+
json_share_lower = func.lower(json_share_str)
169170

170171
if share_value:
171172
# Groups open to anyone: data is null, config.share is null, or share is true
172173
# Use case-insensitive string comparison to handle variations like "True", "TRUE"
173174
anyone_can_share = or_(
174175
Group.data.is_(None),
175-
json_share_lower.is_(None),
176+
json_share_str.is_(None),
176177
json_share_lower == "true",
177178
)
178179

0 commit comments

Comments
 (0)