mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[PR #23111] [CLOSED] fix: handle None meta in FileMeta.sanitize_meta() to prevent API 500 errors #27035
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/23111
Author: @yang1002378395-cmyk
Created: 3/26/2026
Status: ❌ Closed
Base:
dev← Head:fix/files-api-500-null-meta-v2📝 Commits (1)
bfe164efix: handle None meta in FileMeta.sanitize_meta() to prevent API 500 error📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
backend/open_webui/models/files.py(+2 -1)📄 Description
Pull Request Checklist
Changelog Entry
Description
Fixed
Root Cause Analysis
In v0.8.11, FileListResponse.items changed from list[FileModel] to list[FileModelResponse]. FileModelResponse.meta is a required field (not Optional), but sanitize_meta() was returning None unchanged when the database value was NULL. This caused Pydantic v2 to raise ValidationError → HTTP 500.
Test Plan
Fixes #23101
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.