From 78f1d0610f4ea89cce068d71f7eabe45d583584a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 10 Sep 2019 09:34:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=AB=9E=E8=B5=9B=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/competition_team.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/competition_team.rb b/app/models/competition_team.rb index 7b0e6d50..a8f48b3e 100644 --- a/app/models/competition_team.rb +++ b/app/models/competition_team.rb @@ -12,7 +12,7 @@ class CompetitionTeam < ActiveRecord::Base def teacher teacher_id = self.teachers.first&.user_id - User.find_by(id: teacher_id) + User.where(id: teacher_id).first end def group_members