Skip to content

Commit

Permalink
fix:更新数据时,不做是否为空的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit committed Apr 17, 2024
1 parent 8089f03 commit 19f5d4a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/backend/bisheng/api/services/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ async def update_assistant(cls, req: AssistantUpdateReq, user_payload: UserPaylo
return AssistantNameRepeatError.return_resp()
assistant.name = req.name
assistant.desc = req.desc
assistant.logo = req.logo or assistant.logo
assistant.prompt = req.prompt or assistant.prompt
assistant.guide_word = req.guide_word or assistant.guide_word
assistant.guide_question = req.guide_question or assistant.guide_question
assistant.model_name = req.model_name or assistant.model_name
assistant.temperature = req.temperature or assistant.temperature
assistant.logo = req.logo
assistant.prompt = req.prompt
assistant.guide_word = req.guide_word
assistant.guide_question = req.guide_question
assistant.model_name = req.model_name
assistant.temperature = req.temperature
assistant.update_time = datetime.now()
AssistantDao.update_assistant(assistant)

Expand Down

0 comments on commit 19f5d4a

Please sign in to comment.