From e40851d9fc7a653dc7c16f70eb6500c1608838f9 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Sat, 2 Sep 2017 11:48:23 -0400 Subject: [PATCH] Pool numbers need swapped when wrestlers are swapped --- app/services/wrestler_services/swap_wrestlers.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/wrestler_services/swap_wrestlers.rb b/app/services/wrestler_services/swap_wrestlers.rb index c3a0502..772beaa 100644 --- a/app/services/wrestler_services/swap_wrestlers.rb +++ b/app/services/wrestler_services/swap_wrestlers.rb @@ -11,15 +11,18 @@ class SwapWrestlers w3.weight_id = w1.weight_id w3.original_seed = w1.original_seed w3.seed = w1.seed + w3.pool = w1.pool swapWrestlerMatches(w1.allMatches,w1.id,w3.id) #Swap wrestler 1 and wrestler 2 swapWrestlerMatches(w2.allMatches,w2.id,w1.id) w1.seed = w2.seed + w1.pool = w2.pool swapWrestlerMatches(w3.allMatches,w3.id,w2.id) w2.seed = w3.seed + w2.pool = w3.pool w1.save