dev_forum
SylorHuang 5 years ago
parent 226afa2d96
commit a8b0f950c7

@ -27,15 +27,11 @@ json.shixun_detail do
json.output_detail output_detail game, output json.output_detail output_detail game, output
end end
if game.evaluate_count > 0 if game.try(:lastest_code).blank?
if game.try(:lastest_code).blank? cha_path = challenge_path(shixun_challenge.challenge&.path)
cha_path = challenge_path(shixun_challenge.challenge&.path) latest_code = git_fle_content(shixun_challenge.shixun&.repo_path,cha_path)
latest_code = git_fle_content(shixun_challenge.shixun&.repo_path,cha_path)
else
latest_code = game.try(:lastest_code)
end
else else
latest_code = nil latest_code = game.try(:lastest_code)
end end
json.passed_code latest_code json.passed_code latest_code

Loading…
Cancel
Save