From 6b6a1c58035296cdf5b5af36cb71ad316e5d9e41 Mon Sep 17 00:00:00 2001 From: ulleo Date: Fri, 27 Jun 2025 13:57:29 +0800 Subject: [PATCH] fix: chat engine_type not null --- backend/apps/chat/curd/chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/apps/chat/curd/chat.py b/backend/apps/chat/curd/chat.py index e8750fa5..80b93b22 100644 --- a/backend/apps/chat/curd/chat.py +++ b/backend/apps/chat/curd/chat.py @@ -96,6 +96,8 @@ def create_chat(session: SessionDep, current_user: CurrentUser, create_chat_obj: raise Exception(f"Datasource with id {create_chat_obj.datasource} not found") chat.engine_type = ds.type_name + else: + chat.engine_type = '' chat_info = ChatInfo(**chat.model_dump())