diff --git a/app/services/cnmoocs_service.rb b/app/services/cnmoocs_service.rb index e1bae88d..a30e2ef2 100644 --- a/app/services/cnmoocs_service.rb +++ b/app/services/cnmoocs_service.rb @@ -129,7 +129,7 @@ class CnmoocsService # shixun_ids = StageShixun.where(:stage_id => subject.stages).pluck(:shixun_id) #myshixuns = Myshixun.where(:user_id => params[:userId], shixun_id: shixun_ids).includes(:games) myshixun = shixun.myshixuns.where(:user_id => params[:userId]).includes(:games) - if myshixun + if myshixun.present? score = myshixun.total_score time = 0 myshixun.games.each do |game|