Skip to content

Commit

Permalink
submit
Browse files Browse the repository at this point in the history
  • Loading branch information
stgm committed May 22, 2019
1 parent 8951d6f commit f563f5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/submit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def check_score
return check_results[tool].count { |x| x["status"].present? } / check_results[tool].size.to_f
when "check50v3"
return check_results[tool]["results"].count { |x| x["passed"].present? } / check_results[tool]["results"].size.to_f
when "checkpy" && self.check_results[tool].is_a?(Array)
when "checkpy" && check_results[tool].is_a?(Array)
return check_results[tool].collect { |f| f["nPassed"] }.sum
when "checkpy" && self.check_results[tool].is_a?(Hash)
when "checkpy" && check_results[tool].is_a?(Hash)
return [check_results[tool]].collect { |f| f["nPassed"] }.sum
end
end
Expand Down

0 comments on commit f563f5e

Please sign in to comment.