From 1fff4620e61ac2dee1e4562a586c275657cbac6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=9B=E9=9C=B2=E5=85=88=E7=94=9F?= Date: Wed, 3 Sep 2025 11:25:18 +0800 Subject: [PATCH] clean console apis and rag cleans. (#25042) Signed-off-by: zhanluxianshen Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- api/controllers/console/explore/conversation.py | 1 - api/controllers/web/conversation.py | 2 -- api/core/rag/extractor/blob/blob.py | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api/controllers/console/explore/conversation.py b/api/controllers/console/explore/conversation.py index a8d46954b..43ad3ecfb 100644 --- a/api/controllers/console/explore/conversation.py +++ b/api/controllers/console/explore/conversation.py @@ -61,7 +61,6 @@ class ConversationApi(InstalledAppResource): ConversationService.delete(app_model, conversation_id, current_user) except ConversationNotExistsError: raise NotFound("Conversation Not Exists.") - WebConversationService.unpin(app_model, conversation_id, current_user) return {"result": "success"}, 204 diff --git a/api/controllers/web/conversation.py b/api/controllers/web/conversation.py index ea4138826..24de4f3f2 100644 --- a/api/controllers/web/conversation.py +++ b/api/controllers/web/conversation.py @@ -73,8 +73,6 @@ class ConversationApi(WebApiResource): ConversationService.delete(app_model, conversation_id, end_user) except ConversationNotExistsError: raise NotFound("Conversation Not Exists.") - WebConversationService.unpin(app_model, conversation_id, end_user) - return {"result": "success"}, 204 diff --git a/api/core/rag/extractor/blob/blob.py b/api/core/rag/extractor/blob/blob.py index 01003a13b..60dbc449f 100644 --- a/api/core/rag/extractor/blob/blob.py +++ b/api/core/rag/extractor/blob/blob.py @@ -107,7 +107,7 @@ class Blob(BaseModel): Blob instance """ if mime_type is None and guess_type: - _mimetype = mimetypes.guess_type(path)[0] if guess_type else None + _mimetype = mimetypes.guess_type(path)[0] else: _mimetype = mime_type # We do not load the data immediately, instead we treat the blob as a