Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Who-beat-whom standings criterion factors outrounds #1073

Closed
viranw opened this issue Apr 22, 2019 · 1 comment
Closed

Who-beat-whom standings criterion factors outrounds #1073

viranw opened this issue Apr 22, 2019 · 1 comment
Labels
Milestone

Comments

@viranw
Copy link
Contributor

viranw commented Apr 22, 2019

If two teams who would be subject to WBW face each other in the outrounds, the result of that debate is factored into the WBW calculation used for breaks and the team tab, which is probably not expected behaviour (though maybe there are other cases where this behaviour would be expected that I haven't thought of?)

@czlee
Copy link
Member

czlee commented Apr 22, 2019

It's not expected behaviour, nice catch 🙂

These lines should filter for debate_team__debate__round__stage=Round.STAGE_PRELIMINARY:

def get_team_scores(self, key, equal_teams, tsi, round):
equal_teams.remove(tsi)
other = equal_teams[0]
ts = TeamScore.objects.filter(
ballot_submission__confirmed=True,
debate_team__team=tsi.team,
debate_team__debate__debateteam__team=other.team)
if round is not None:
ts = ts.filter(debate_team__debate__round__seq__lte=round.seq)

And we should add a unit test to check for this.

@czlee czlee added bugs Reported/reproduced bugs good first issue help wanted labels Apr 22, 2019
@czlee czlee added this to the Hotfixes milestone Apr 22, 2019
@czlee czlee closed this as completed in e9b1ffe May 25, 2020
czlee added a commit that referenced this issue May 25, 2020
- Moved elimination round tests to separate tests #1073
- Added checks for unconfirmed ballots
- Suppress routine logs to prevent clutter when run from command line
- Two expected failures in draw strength, see #1466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants