From a131fad0eb1fb9a9203612819309b3dcff6252a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Mon, 27 Apr 2026 18:07:35 +0800 Subject: [PATCH] perf: Return the obtained `chat_record` --- apps/chat/serializers/chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/chat/serializers/chat.py b/apps/chat/serializers/chat.py index 4514dc457bc..fd58b3e2d13 100644 --- a/apps/chat/serializers/chat.py +++ b/apps/chat/serializers/chat.py @@ -386,6 +386,8 @@ def get_chat_record(chat_info, chat_record_id): if chat_record is None: if not is_valid_uuid(chat_record_id): raise ChatException(500, _("Conversation record does not exist")) + else: + return chat_record chat_record = QuerySet(ChatRecord).filter(id=chat_record_id).first() return chat_record