[PR #22976] [CLOSED] fix(chats): remove errant db= kwarg from upsert_message call #50004

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22976
Author: @BillionClaw
Created: 3/24/2026
Status: Closed

Base: mainHead: clawoss/fix/22959-remove-db-arg


📝 Commits (2)

  • 08deec8 fix(code-interpreter): inject Pyodide prompt into system message not user turn
  • 4c0977a fix(chats): remove errant db= argument from upsert_message call

📊 Changes

2 files changed (+4 additions, -3 deletions)

View changed files

📝 backend/open_webui/routers/chats.py (+0 -1)
📝 backend/open_webui/utils/middleware.py (+4 -2)

📄 Description

The function does not accept a db parameter, but the call was passing db=db as a 4th argument, causing a TypeError.

Removed the errant db=db argument from the call site in routers/chats.py. The function operates on in-memory chat objects and writes to the chat_message table internally — no external db session needed at the call site.

Fixes #22959


🔄 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/22976 **Author:** [@BillionClaw](https://github.com/BillionClaw) **Created:** 3/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `clawoss/fix/22959-remove-db-arg` --- ### 📝 Commits (2) - [`08deec8`](https://github.com/open-webui/open-webui/commit/08deec86b1ff0f230705afa0a5ae38a0fe4cf1ac) fix(code-interpreter): inject Pyodide prompt into system message not user turn - [`4c0977a`](https://github.com/open-webui/open-webui/commit/4c0977a1c02681e79bcc0917c8172a6277ea88be) fix(chats): remove errant db= argument from upsert_message call ### 📊 Changes **2 files changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/chats.py` (+0 -1) 📝 `backend/open_webui/utils/middleware.py` (+4 -2) </details> ### 📄 Description The function does not accept a `db` parameter, but the call was passing `db=db` as a 4th argument, causing a TypeError. Removed the errant `db=db` argument from the call site in routers/chats.py. The function operates on in-memory chat objects and writes to the chat_message table internally — no external db session needed at the call site. Fixes #22959 --- <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:27:27 -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#50004