mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-19 00:03:21 +00:00
Both _get_access_grants and _to_prompt_model referenced an undefined local variable 'session' instead of the 'db' parameter passed to each method. Because these helpers are called outside of any 'async with get_async_db_context()' block, 'session' did not exist in their scope, causing a NameError on every prompt fetch. The NameError was silently swallowed by the broad 'except Exception' clause in get_prompt_by_id, which returned None — causing the frontend [id]/+page.svelte to immediately redirect back to /workspace/prompts rather than rendering the prompt editor. Also adds the missing 'logging' import and module-level 'log' logger, which was referenced (but never imported) in insert_new_prompt, update_prompt_version, and delete_prompt_by_id. |
||
|---|---|---|
| .. | ||
| access_grants.py | ||
| auths.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat_messages.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 | ||
| shared_chats.py | ||
| skills.py | ||
| tags.py | ||
| tools.py | ||
| users.py | ||