From 79eb49c7506e85cb73e4b253c370cfb158dc6ed0 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Fri, 28 Jun 2019 14:26:46 +0800 Subject: [PATCH] fix bug --- app/views/exercises/_user_exercise_info.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/exercises/_user_exercise_info.json.jbuilder b/app/views/exercises/_user_exercise_info.json.jbuilder index 5b5d0c725..cc10f5bb7 100644 --- a/app/views/exercises/_user_exercise_info.json.jbuilder +++ b/app/views/exercises/_user_exercise_info.json.jbuilder @@ -54,7 +54,7 @@ json.exercise_questions do this_ques_status = all_question_status.detect {|f| f[:q_id] == q.id} json.answer_status this_ques_status[:stand_status] end - json.user_score user_ques_answers[:user_score].to_s + json.user_score user_ques_answers[:user_score].present? ? user_ques_answers[:user_score].to_s : nil json.partial! "exercise_questions/exercise_questions", question: q, ex_answerer: ex_answerer,