Browse Source

fix:ai问答topic编辑

zqbao 5 months ago
parent
commit
542a691126
1 changed files with 1 additions and 1 deletions
  1. 1 1
      controllers/ai/ai.go

+ 1 - 1
controllers/ai/ai.go

@@ -322,7 +322,7 @@ func (this *AiController) TopicEdit() {
 		br.ErrMsg = "获取数据失败!Err:" + err.Error()
 		br.ErrMsg = "获取数据失败!Err:" + err.Error()
 		return
 		return
 	}
 	}
-	if topic != nil && topic.AiChatTopicId != req.AiChatTopicId {
+	if topic != nil && topic.AiChatTopicId > 0 && topic.AiChatTopicId != req.AiChatTopicId {
 		br.Msg = "话题名称已存在,请重新修改!"
 		br.Msg = "话题名称已存在,请重新修改!"
 		return
 		return
 	}
 	}