From 4c6a24b69b4cfebe538b527e4949a552c50b26dc Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 12:19:16 +0800 Subject: [PATCH] 1 --- app/controllers/challenges_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index ca8f60409..86658aca8 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -209,11 +209,11 @@ class ChallengesController < ApplicationController @challenge.update_column(:modify_time, Time.now) # 测试集的 @shixun.myshixuns.update_all(:system_tip => 0) - logger.info("########---#{params[:challenge]}") - logger.info("########---#{params[:challenge]['show_type']}") - if params[:challenge][:show_type].to_i == -1 - @challenge.update_attributes(picture_path: nil, web_route: nil, expect_picture_path: nil, original_picture_path: nil) - end + end + logger.info("########---#{params[:challenge]}") + logger.info("########---#{params[:challenge]['show_type']}") + if params[:challenge][:show_type].to_i == -1 + @challenge.update_attributes(picture_path: nil, web_route: nil, expect_picture_path: nil, original_picture_path: nil) end # 关卡评测执行文件如果被修改,需要修改脚本内容 script = modify_shixun_script @shixun, @shixun.evaluate_script