From 1a63a42a4c5fe848ab7053eaf7ede23d59840614 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Tue, 7 Apr 2026 11:25:31 +0800 Subject: [PATCH] fix: Debugging applications requiring authentication results in errors --- apps/chat/serializers/chat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/chat/serializers/chat.py b/apps/chat/serializers/chat.py index b474e567853..ddb08cbcc6f 100644 --- a/apps/chat/serializers/chat.py +++ b/apps/chat/serializers/chat.py @@ -460,7 +460,8 @@ def chat(self, instance: dict, base_to_response: BaseToResponse = SystemToRespon chat_info.get_application() chat_info.get_chat_user(asker=(instance.get('form_data') or {}).get('asker')) self.is_valid_chat_id(chat_info) - self.is_valid_chat_user() + if not self.data.get('debug'): + self.is_valid_chat_user() if chat_info.application.type == ApplicationTypeChoices.SIMPLE: self.is_valid_application_simple(raise_exception=True, chat_info=chat_info) return self.chat_simple(chat_info, instance, base_to_response)