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