From 6b5bdc1563733eeec3c88589a81fbcd68822c267 Mon Sep 17 00:00:00 2001 From: jinghuan-Chen <275923410@qq.com> Date: Wed, 12 Nov 2025 16:06:53 +0800 Subject: [PATCH] Use and logic. --- backend/apps/chat/task/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/apps/chat/task/llm.py b/backend/apps/chat/task/llm.py index c4a69a54..6de56a33 100644 --- a/backend/apps/chat/task/llm.py +++ b/backend/apps/chat/task/llm.py @@ -926,7 +926,7 @@ class LLMService: # return title if self.change_title: - if self.chat_question.question or self.chat_question.question.strip() != '': + if self.chat_question.question and self.chat_question.question.strip() != '': brief = rename_chat(session=_session, rename_object=RenameChat(id=self.get_record().chat_id, brief=self.chat_question.question.strip()[:20]))