Merge branch 'yuanke' into develop

This commit is contained in:
yuanke 2016-07-13 15:56:44 +08:00
commit 15ccf5cfbe
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class StudentWorkTest < ActiveRecord::Base
private
def get_success_count
self.results.inject(0) do |sum, result|
sum += (result["status"] && result["status"].to_i == 0 ? 1 : 0)
sum += (result["status"] && result["status"].class == ::Fixnum && result["status"].to_i == 0 ? 1 : 0)
end || 0
end