From 33b2281b7b9605a8564aa3fd40df65c900ffad80 Mon Sep 17 00:00:00 2001 From: wanyaokun <12345678> Date: Mon, 26 Aug 2024 20:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ID=E4=B8=BA=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/routers/request/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/app/api/routers/request/base.py b/backend/app/api/routers/request/base.py index b50333a..7723d49 100644 --- a/backend/app/api/routers/request/base.py +++ b/backend/app/api/routers/request/base.py @@ -27,6 +27,9 @@ class conversations: return None def add(self,user_id:str,name:str,id:str = ''): + import uuid + if id == '': + id= str(uuid.uuid4()) template = BaseConfig.ConversationCfg template['id'] = id template['user_id'] = user_id