mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #22588] [MERGED] fix: handle non-dict history/messages in chat_message migration #81644
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/22588
Author: @Classic298
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @tjbck
Base:
dev← Head:fix/chat-message-migration-list-handling📝 Commits (1)
bd11d2afix: handle non-dict history/messages in chat_message migration📊 Changes
1 file changed (+5 additions, -0 deletions)
View changed files
📝
backend/open_webui/migrations/versions/8452d01d26d7_add_chat_message_table.py(+5 -0)📄 Description
Some databases contain chat records where 'history' or 'messages' are stored as lists instead of dicts. This causes an AttributeError ('list' object has no attribute 'items') during the 8452d01d26d7_add_chat_message_table migration.
Add isinstance checks to skip chat records with unexpected data shapes gracefully, matching the existing pattern used for individual message validation.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.