From c417f6a23b0a5750b97846b0251759603ce8b294 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 20 Mar 2020 21:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/exercises_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb index 19c4e14f3..1887aee5a 100644 --- a/app/helpers/exercises_helper.rb +++ b/app/helpers/exercises_helper.rb @@ -998,7 +998,7 @@ module ExercisesHelper def has_comment? exercise_user, question_ids exercise_answer_ids = exercise_user.user.exercise_answers.where(exercise_question_id: question_ids).pluck(:id) exercise_shixun_answer_ids = exercise_user.user.exercise_shixun_answers.where(exercise_question_id: question_ids).pluck(:id) - exercise_user.commit_status == 1 && (exercise_user.exercise_user_scores.size > 0 || exercise_user.subjective_score >= 0.0 || + exercise_user.commit_status == 1 && (exercise_user.exercise_user_scores.size > 0 || ExerciseAnswerComment.where(exercise_answer_id: exercise_answer_ids).or(ExerciseAnswerComment.where(exercise_shixun_answer_id: exercise_shixun_answer_ids)).exists?) end end