From 24f149f686117ccae41ae73a11193d8a8c22b0cf Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 15 Oct 2024 02:52:56 -0700 Subject: [PATCH] refac: pinned chat behaviour --- backend/open_webui/apps/webui/models/chats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/apps/webui/models/chats.py b/backend/open_webui/apps/webui/models/chats.py index 15501e49a..13823e709 100644 --- a/backend/open_webui/apps/webui/models/chats.py +++ b/backend/open_webui/apps/webui/models/chats.py @@ -276,7 +276,7 @@ class ChatTable: limit: Optional[int] = None, ) -> list[ChatTitleIdResponse]: with get_db() as db: - query = db.query(Chat).filter_by(user_id=user_id) + query = db.query(Chat).filter_by(user_id=user_id, pinned=False) if not include_archived: query = query.filter_by(archived=False)