mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed tournament error bug
This commit is contained in:
@@ -112,7 +112,12 @@ class Tournament < ActiveRecord::Base
|
||||
|
||||
def poolToBracketWeightsWithTooManyWrestlers
|
||||
if self.tournament_type == "Pool to bracket"
|
||||
weights.select{|w| w.wrestlers.size > 16}
|
||||
weightsWithTooManyWrestlers = weights.select{|w| w.wrestlers.size > 16}
|
||||
if weightsWithTooManyWrestlers.size < 1
|
||||
return nil
|
||||
else
|
||||
return weightsWithTooManyWrestlers
|
||||
end
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user