From e145fb614f3f6ac5c1e56f99e8dddc902b1d8fa5 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 2 Aug 2019 19:29:11 +0800 Subject: [PATCH] fix --- app/controllers/competition_teams_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb index 18c16f91..b1d6788e 100644 --- a/app/controllers/competition_teams_controller.rb +++ b/app/controllers/competition_teams_controller.rb @@ -382,7 +382,7 @@ class CompetitionTeamsController < ApplicationController .select('sum(compelete_status !=0 ) as finish, count(*) as total') .having('total != 0 and finish >= (total / 2)').to_sql Shixun.joins(homework_commons_shixuns: :homework_common) - .where(homework_commons: { homework_type: 3 }) + .where(homework_commons: { homework_type: 4 }) .where('course_id in (?)', ids) .where("exists (#{percentage_sql})") .group('course_id').count