1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Reload last_match and wrestler in advanced_wrestler. Moved calculate team score to the end of advance_wrestler.

This commit is contained in:
2025-09-15 18:22:42 -04:00
parent dd5ce9bd60
commit d61ed80287
4 changed files with 21 additions and 16 deletions

View File

@@ -12,12 +12,14 @@ class AdvanceWrestler
end
def advance_raw
@last_match.reload
@wrestler.reload
if @last_match && @last_match.finished?
pool_to_bracket_advancement if @tournament.tournament_type == "Pool to bracket"
ModifiedDoubleEliminationAdvance.new(@wrestler, @last_match).bracket_advancement if @tournament.tournament_type.include? "Modified 16 Man Double Elimination"
DoubleEliminationAdvance.new(@wrestler, @last_match).bracket_advancement if @tournament.tournament_type.include? "Regular Double Elimination"
end
@wrestler.school.calculate_score
end
def pool_to_bracket_advancement