1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-24 17:04:43 +00:00

Fixed query issue for advancing losing wrestlers in a 'pool to bracket' bracket

This commit is contained in:
2017-11-09 08:13:29 -05:00
parent 611f54f522
commit 4089d37825

View File

@@ -67,7 +67,7 @@ class PoolAdvance
def loserAdvance
bout = @wrestler.lastMatch.bout_number
next_match = Match.where("loser1_name = ? OR loser2_name = ? AND weight_id = ?","Loser of #{bout}","Loser of #{bout}",@wrestler.weight_id)
next_match = Match.where("(loser1_name = ? OR loser2_name = ?) AND weight_id = ?","Loser of #{bout}","Loser of #{bout}",@wrestler.weight_id)
if next_match.size > 0
next_match.first.replaceLoserNameWithWrestler(@wrestler,"Loser of #{bout}")
end