mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed query issue for advancing losing wrestlers in a 'pool to bracket' bracket
This commit is contained in:
@@ -67,7 +67,7 @@ class PoolAdvance
|
|||||||
|
|
||||||
def loserAdvance
|
def loserAdvance
|
||||||
bout = @wrestler.lastMatch.bout_number
|
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
|
if next_match.size > 0
|
||||||
next_match.first.replaceLoserNameWithWrestler(@wrestler,"Loser of #{bout}")
|
next_match.first.replaceLoserNameWithWrestler(@wrestler,"Loser of #{bout}")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user