open-webui/backend/open_webui/routers
Classic298 f0e0cfcf02
perf: avoid redundant knowledge re-fetch in update_knowledge_access_by_id (#23799)
After set_access_grants, the handler was reloading the same knowledge
record via get_knowledge_by_id, which triggers an extra SELECT plus a
nested fetch of access grants. set_access_grants already returns the
newly-written grants and the local knowledge object is otherwise
unchanged, so update it in place and reuse it for the response.

https://claude.ai/code/session_01S18Lgqbih7Ry2JZUUv8TxF

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 14:44:42 +09:00
..
analytics.py chore: format 2026-04-12 18:12:59 -05:00
audio.py refac 2026-04-17 13:04:07 +09:00
auths.py refac 2026-04-13 14:08:58 -05:00
automations.py refac 2026-04-13 14:08:58 -05:00
channels.py refac 2026-04-13 14:08:58 -05:00
chats.py refac: shared chat 2026-04-17 10:16:32 +09:00
configs.py refac 2026-04-13 18:20:46 -05:00
evaluations.py chore: format 2026-04-12 18:12:59 -05:00
files.py refac 2026-04-14 10:55:11 -05:00
folders.py chore: format 2026-04-12 18:12:59 -05:00
functions.py refac 2026-04-13 14:08:58 -05:00
groups.py refac: async db 2026-04-12 14:22:11 -05:00
images.py refac 2026-04-17 11:48:17 +09:00
knowledge.py perf: avoid redundant knowledge re-fetch in update_knowledge_access_by_id (#23799) 2026-04-17 14:44:42 +09:00
memories.py chore: format 2026-04-17 14:28:18 +09:00
models.py refac 2026-04-17 13:33:11 +09:00
notes.py refac 2026-04-14 17:22:54 -05:00
ollama.py refac 2026-04-17 14:15:36 +09:00
openai.py refac 2026-04-13 14:29:27 -05:00
pipelines.py refac 2026-03-24 04:49:48 -05:00
prompts.py refac 2026-04-13 14:08:58 -05:00
retrieval.py chore: format 2026-04-17 14:28:18 +09:00
scim.py refac: async db 2026-04-12 14:22:11 -05:00
skills.py refac: async db 2026-04-12 14:22:11 -05:00
tasks.py refac 2026-04-13 14:08:58 -05:00
terminals.py refac: async db 2026-04-12 14:22:11 -05:00
tools.py refac 2026-04-13 14:08:58 -05:00
users.py perf(users): drop redundant get_user_by_id refetch in session-user endpoints (#23794) 2026-04-17 11:23:08 +09:00
utils.py refac 2026-04-13 14:08:58 -05:00