xiexiaoyuan 2 жил өмнө
parent
commit
5a715f049b

+ 5 - 1
services/community/question.go

@@ -452,7 +452,11 @@ func AddAudioListenLog(userInfo user.UserInfo, audioId int, sourceAgent int) (er
 		err = errors.New("查询音频信息失败 Err:" + err.Error())
 		return
 	}
-	if audio.CommunityQuestionAudioID == 0 {
+	if err == utils.ErrNoRow {
+		err = errors.New("音频不存在")
+		return
+	}
+	if audio == nil {
 		err = errors.New("音频不存在")
 		return
 	}