mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #22701] [CLOSED] fix: resolve UnboundLocalError for limit in oracle23ai.py get() #26820
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22701
Author: @mvanhorn
Created: 3/15/2026
Status: ❌ Closed
Base:
main← Head:osc/22664-oracle23ai-unbound-limit📝 Commits (1)
5ff0ddbfix: resolve UnboundLocalError for limit in oracle23ai.py get()📊 Changes
1 file changed (+3 additions, -4 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/oracle23ai.py(+3 -4)📄 Description
Summary
Moves the
limit = 1000assignment before thelog.info()call that references it in theget()method oforacle23ai.py.Changes
The
get()method's function signature isdef get(self, collection_name: str)with nolimitparameter. Thelog.info()at line 714 referencedlimitbefore it was assigned at line 718, causing anUnboundLocalErrorwhen Oracle 23ai hybrid search was activated.The fix moves the assignment above the log statement so
limitis defined when the log message is formatted.Testing
limitparameterlimitis assignedquery()method in the same file shows the correct pattern (limit as a parameter)Fixes #22664
Closes #22616
This contribution was developed with AI assistance (Claude Code).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.