Fabian-Sommer / HeroesLounge

https://heroeslounge.gg
MIT License
16 stars 11 forks source link

Free map win in playoff doesnt always work #5

Open Fabian-Sommer opened 6 years ago

Fabian-Sommer commented 6 years ago

Entering a draw in a playoff game causes there to be a winner_id = 0 instead of NULL. This is then detected as a set value, and when admin is trying to assign a free win, it tries to delete team 0 from the next game.

Astraeus- commented 5 years ago

I tried to reproduce this issue locally but wasn't able to do so. As far as I could tell only determineWinnerAndSave() could set the match->winner_id = 0. I'm not sure if my suggested change in playoff-draw-fix would fix the issue, because the determineWinnerAndSave() is never called when a match is updated from the back-end.

My assumption is that a moderator assigned a draw in the back-end, and after that had happened, the one of the teams involved could still save (and did save) their match from the front-end causing determineWinnerAndSave() to be run and match->winner_id = 0 happening.