From ff4d63db0e13eff55da90875613f441e4847a5e2 Mon Sep 17 00:00:00 2001 From: Weves Date: Mon, 30 Dec 2024 19:17:33 -0800 Subject: [PATCH] Small fix --- backend/onyx/server/query_and_chat/query_backend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/onyx/server/query_and_chat/query_backend.py b/backend/onyx/server/query_and_chat/query_backend.py index 9d304d82356..1c589a7756c 100644 --- a/backend/onyx/server/query_and_chat/query_backend.py +++ b/backend/onyx/server/query_and_chat/query_backend.py @@ -22,6 +22,7 @@ from onyx.db.chat import get_valid_messages_from_query_sessions from onyx.db.chat import translate_db_message_to_chat_message_detail from onyx.db.chat import translate_db_search_doc_to_server_search_doc +from onyx.db.engine import get_current_tenant_id from onyx.db.engine import get_session from onyx.db.models import User from onyx.db.search_settings import get_current_search_settings @@ -48,6 +49,7 @@ def admin_search( question: AdminSearchRequest, user: User | None = Depends(current_curator_or_admin_user), db_session: Session = Depends(get_session), + tenant_id: str = Depends(get_current_tenant_id), ) -> AdminSearchResponse: query = question.query logger.notice(f"Received admin search query: {query}") @@ -58,6 +60,7 @@ def admin_search( time_cutoff=question.filters.time_cutoff, tags=question.filters.tags, access_control_list=user_acl_filters, + tenant_id=tenant_id, ) search_settings = get_current_search_settings(db_session) document_index = get_default_document_index(