|
|
|
@ -21,7 +21,7 @@ class Competitions::CreatePersonalTeamService < ApplicationService
|
|
|
|
|
|
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
|
team = competition.competition_teams.create!(name: user.real_name, user_id: user.id)
|
|
|
|
|
team.team_members.create!(competition_id: competition, user_id: user.id, role: 1, is_teacher: is_teacher)
|
|
|
|
|
team.team_members.create!(competition_id: competition.id, user_id: user.id, role: 1, is_teacher: is_teacher)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|