competition: fix enroll api error

dev_sync_trustie
p31729568 5 years ago
parent 3aa5e8a925
commit 90a487acf9

@ -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
Loading…
Cancel
Save