mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #10549] [MERGED] Fix: Ensure user_oauth_groups defaults to an empty list to prevent TypeError
#22556
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/10549
Author: @jeannotdamoiseaux
Created: 2/21/2025
Status: ✅ Merged
Merged: 2/21/2025
Merged by: @tjbck
Base:
dev← Head:fix/oauth-groups-default-typeerror📝 Commits (1)
d50098bFix: Ensureuser_oauth_groupsdefaults to an empty list to prevent TypeError📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/utils/oauth.py(+1 -1)📄 Description
When the OAuth groups claim does not yield a list,
user_oauth_groupswas previously set to None, causing a TypeError during membership checks. Changed this default to an empty list ([]) to ensure the variable is always iterable, preventing errors for non-admin users while logging in.This fix ensures stability in the
update_user_groupsfunction.Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.