mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-14 23:22:44 +00: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 |
||
|---|---|---|
| .. | ||
| auths.py | ||
| channels.py | ||
| chats.py | ||
| feedbacks.py | ||
| files.py | ||
| folders.py | ||
| functions.py | ||
| groups.py | ||
| knowledge.py | ||
| memories.py | ||
| messages.py | ||
| models.py | ||
| notes.py | ||
| oauth_sessions.py | ||
| prompt_history.py | ||
| prompts.py | ||
| tags.py | ||
| tools.py | ||
| users.py | ||