From 039d04d7b1adc39a5872aaca630814c44a38234a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 30 Jul 2019 09:41:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competitions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/competitions_controller.rb b/app/controllers/competitions_controller.rb index 43181d8c..57ff871c 100644 --- a/app/controllers/competitions_controller.rb +++ b/app/controllers/competitions_controller.rb @@ -782,7 +782,7 @@ class CompetitionsController < ApplicationController challenges.each do |challenge| Game.where(:challenge_id => challenge.id, :user_id => user_ids, :status => 2).select{|game| game.open_time >= s_time && game.end_time <= e_time }.each do |game| - outputs = game.outputs.select{|output| !output.text_scor.nil? } + outputs = game.outputs.select{|output| !output.text_scor.nil? && output.created_at <= e_time } if outputs.present? outputs = outputs.sort { |a, b| b[:text_scor].to_f <=> a[:text_scor].to_f } myshixun_score = outputs.first.text_scor.to_f