From dad97869b6c653912f5f27326cd95fe98c4b7d4b Mon Sep 17 00:00:00 2001 From: Liu An Date: Mon, 18 Aug 2025 19:02:10 +0800 Subject: [PATCH] Fix: search service reference (#9533) ### What problem does this PR solve? - Update search_app.py to use SearchService instead of KnowledgebaseService for duplicate ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/search_app.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/apps/search_app.py b/api/apps/search_app.py index 25d11381c..80e27a092 100644 --- a/api/apps/search_app.py +++ b/api/apps/search_app.py @@ -22,7 +22,6 @@ from api.constants import DATASET_NAME_LIMIT from api.db import StatusEnum from api.db.db_models import DB from api.db.services import duplicate_name -from api.db.services.knowledgebase_service import KnowledgebaseService from api.db.services.search_service import SearchService from api.db.services.user_service import TenantService, UserTenantService from api.utils import get_uuid @@ -47,7 +46,7 @@ def create(): return get_data_error_result(message="Authorizationd identity.") search_name = search_name.strip() - search_name = duplicate_name(KnowledgebaseService.query, name=search_name, tenant_id=current_user.id, status=StatusEnum.VALID.value) + search_name = duplicate_name(SearchService.query, name=search_name, tenant_id=current_user.id, status=StatusEnum.VALID.value) req["id"] = get_uuid() req["name"] = search_name