UEWBot / dipvis

Django-based visualiser for tournaments for the boardgame Diplomacy
GNU General Public License v3.0
7 stars 5 forks source link

Failing to do roll call for round 1 of EDC #233

Closed UEWBot closed 1 year ago

UEWBot commented 1 year ago

When clicking "Submit" on the roll call page EDC round 1, it didn't go to the "get seven" page.

UEWBot commented 1 year ago

Digging into the code, there's a redirect to the same page if the roll call is not for the "current round". "Current round" is either the first round with RoundPlayers or the last round that isn't finished.

After cloning the Tournament, I was initially able to reproduce this, but that's because the later rounds had been played. After removing all the Games and RoundPlayers for later rounds, I was unable to reproduce it.

I think this behaviour pre-dates the change to always go to the "get seven" page. It made sense if changing the list of RoundPlayers was going to also re-seed the games, but now we have a warning on the "get seven" page that games will be deleted. The "roll call" page will also refuse to delete a RoundPlayer that has a GamePlayer for the round.

Overall, it seems to make sense to remove this check and just always go to "get seven" if there are no errors.

UEWBot commented 1 year ago

I removed that code that checks for the "current round", which should fix this. Checking with the reporter to see whether they did indeed do the roll call for a later round first before closing, just in case there's another issue hiding here.

UEWBot commented 1 year ago

Reporter says that they didn't, but may have clicked roll call before adding any players. I don't see how that would get it into that state.

Regardless, the only path now through roll_call() with a POST that re-displays the roll call page is when errors_added gets set, in which case we have also call form.add_error(), so the user will get told what went wrong.