[PR #22701] [CLOSED] fix: resolve UnboundLocalError for limit in oracle23ai.py get() #49868

Closed
opened 2026-04-30 02:15:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22701
Author: @mvanhorn
Created: 3/15/2026
Status: Closed

Base: mainHead: osc/22664-oracle23ai-unbound-limit


📝 Commits (1)

  • 5ff0ddb fix: 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 = 1000 assignment before the log.info() call that references it in the get() method of oracle23ai.py.

Changes

The get() method's function signature is def get(self, collection_name: str) with no limit parameter. The log.info() at line 714 referenced limit before it was assigned at line 718, causing an UnboundLocalError when Oracle 23ai hybrid search was activated.

The fix moves the assignment above the log statement so limit is defined when the log message is formatted.

Testing

  • Verified the function signature has no limit parameter
  • Verified the log statement now executes after limit is assigned
  • The query() 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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22701 **Author:** [@mvanhorn](https://github.com/mvanhorn) **Created:** 3/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `osc/22664-oracle23ai-unbound-limit` --- ### 📝 Commits (1) - [`5ff0ddb`](https://github.com/open-webui/open-webui/commit/5ff0ddb9a4c22bc1e2e0ebf3b9dd329505b4a8ba) fix: resolve UnboundLocalError for limit in oracle23ai.py get() ### 📊 Changes **1 file changed** (+3 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/vector/dbs/oracle23ai.py` (+3 -4) </details> ### 📄 Description ## Summary Moves the `limit = 1000` assignment before the `log.info()` call that references it in the `get()` method of `oracle23ai.py`. ## Changes The `get()` method's function signature is `def get(self, collection_name: str)` with no `limit` parameter. The `log.info()` at line 714 referenced `limit` before it was assigned at line 718, causing an `UnboundLocalError` when Oracle 23ai hybrid search was activated. The fix moves the assignment above the log statement so `limit` is defined when the log message is formatted. ## Testing - Verified the function signature has no `limit` parameter - Verified the log statement now executes after `limit` is assigned - The `query()` 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 02:15:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#49868