Removes unnecessary check

This commit is contained in:
Daniel Schädler 2019-04-28 17:15:35 +02:00
parent 22f0204f29
commit 74e9139b33
1 changed files with 2 additions and 4 deletions

View File

@ -41,12 +41,10 @@ class TournamentsController < ApplicationController
team_id = team[:id] team_id = team[:id]
team_name = team[:name] team_name = team[:name]
group = team[:group] group = team[:group]
unless team_id.nil? if team_id
team = Team.find team_id team = Team.find team_id
put_team_into_groups_hash(groups, team, group) put_team_into_groups_hash(groups, team, group)
end elsif team_name
unless team_name.nil?
team = Team.create name: team_name team = Team.create name: team_name
put_team_into_groups_hash(groups, team, group) put_team_into_groups_hash(groups, team, group)
end end