|
|
|
@ -24,7 +24,7 @@ class Competitions::JoinTeamService < ApplicationService
|
|
|
|
|
raise Error, '您已加入该战队' if team.team_members.exists?(user_id: user.id)
|
|
|
|
|
|
|
|
|
|
enrolled = competition.team_members.exists?(user_id: user.id)
|
|
|
|
|
if enrolled && (is_teacher && competition.teacher_multiple_limited?) || (!is_teacher && competition.member_multiple_limited?)
|
|
|
|
|
if enrolled && ((is_teacher && competition.teacher_multiple_limited?) || (!is_teacher && competition.member_multiple_limited?))
|
|
|
|
|
raise Error, '您已加入其它战队'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|