Removes unnecessary check
This commit is contained in:
parent
22f0204f29
commit
74e9139b33
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue