diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cf7ac6d2e..2ab0c6649 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,6 +319,7 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) + return if path.blank? file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常")