diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index 7eef670fc..526535157 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -475,7 +475,7 @@ class StudentWorksController < ApplicationController # 实训作品的评阅 def shixun_work_comment tip_exception("评阅不能为空") if params[:comment].blank? - tip_exception("缺少is_hidden参数") if params[:is_hidden].blank? || ![true, false].include?(params[:is_hidden]) + tip_exception("缺少is_hidden参数") if params[:is_hidden].blank? || ![1, 0].include?(params[:is_hidden]) comment = @work.student_works_scores.shixun_comment.first || StudentWorksScore.new(student_work_id: @work.id, user_id: current_user.id) comment.comment = params[:comment] comment.is_hidden = params[:is_hidden]