mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
## Summary Eliminates redundant database query in update_memory_by_id_and_user_id. Previously, after modifying the memory object, it called get_memory_by_id which opened a new session and queried again. ## Changes models/memories.py update_memory_by_id_and_user_id: - Replace self.get_memory_by_id(id) with db.refresh(memory) - Return the same memory object that was already modified ## Performance Impact Before: 2 queries (get + get_memory_by_id) After: 1 query + refresh on same session