mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
fix: remove invalid expunge call on Pydantic FileModel Files.get_file_by_id() returns a Pydantic FileModel, not an SQLAlchemy ORM object. Calling db.expunge() on a Pydantic model fails with UnmappedInstanceError since it lacks _sa_instance_state. The expunge was also unnecessary because subsequent DB updates already use fresh sessions via get_db() context manager. Fixes #20925