mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-01 03:17:20 -05:00
[PR #20273] [MERGED] fix: prevent insert_shared_chat_by_chat_id crash when chat is None #64392
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20273
Author: @Classic298
Created: 12/30/2025
Status: ✅ Merged
Merged: 12/31/2025
Merged by: @tjbck
Base:
dev← Head:fix/issue-013-shared-chat-null-crash📝 Commits (1)
bec3b97fix: prevent insert_shared_chat_by_chat_id crash when chat is None📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
backend/open_webui/models/chats.py(+3 -0)📄 Description
Add null check after db.get(Chat, chat_id) before accessing chat.share_id. Returns None instead of crashing with AttributeError when chat doesn't exist.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.