mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #23487] [CLOSED] fix: make UserUpdateForm fields optional to allow partial user updates #50266
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/23487
Author: @theshivam7
Created: 4/7/2026
Status: ❌ Closed
Base:
dev← Head:fix/user-update-optional-fields📝 Commits (2)
8462426fix: make UserUpdateForm fields optional to allow partial user updates0758d63fix: reject empty update payload with 400📊 Changes
2 files changed (+29 additions, -13 deletions)
View changed files
📝
backend/open_webui/models/users.py(+7 -5)📝
backend/open_webui/routers/users.py(+22 -8)📄 Description
Pull Request Checklist
devdevChangelog Entry
Description
Fixes #23424
The
POST /{user_id}/updateendpoint required all fields (role,name,email,profile_image_url) in the request body, even when the caller only wanted to update a single field likerole. Sending only{"role": "user"}resulted in a validation error listing all other fields as required.Fixed
role,name,email, andprofile_image_urloptional (Noneby default) inUserUpdateFormAuths.update_email_by_idare skipped whenemailis not providedroleis explicitly set (notNone)profile_image_urlvalidator skipsNonevalues correctlyBefore:
After:
Additional Information
backend/open_webui/models/users.py,backend/open_webui/routers/users.pypasswordwas alreadyOptional— this PR makes the remaining fields consistentContributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.