Skip to content

Commit

Permalink
Merge branch 'hotfix/2.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbelesky committed Nov 14, 2018
2 parents 9deeb50 + 00177a3 commit 56018cd
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 8 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,30 @@
Change Log
==========

2.2.6
-----
*Release date: 14 November 2018*

- Fix issue where check-ins could not be revoked
- Fix issue where the standings overview 'dashboard' included scores from elimination rounds. Thanks to Étienne for this fix
- Fix issue where the Average Individual Speaker Score metric would fail to calculate in some circumstances. Thanks to Étienne for this fix
- Fix issue where draw emails would crash if venues were unspecified. Thanks, again, to Étienne for this fix!


2.2.5
-----
*Release date: 21 October 2018*

- Remove the buttons from the public check-ins page (as these do nothing unless the user is logged in)
- Hopefully fixed error that could cause Team- and Adjudicator- Institutional conflicts to not show properly on Allocation pages
- Thanks to Étienne for pull requests fixing rare bugs in the user creation form and break generation when rounds are not present.
- Thanks to Étienne for pull requests fixing rare bugs in the user creation form and break generation when rounds are not present


2.2.4
-----
*Release date: 09 October 2018*

- Small fixes for functions related to email sending, conflict highlighting, and certain configurations of standings metrics.
- Small fixes for functions related to email sending, conflict highlighting, and certain configurations of standings metrics


2.2.3
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# The short X.Y version.
version = '2.2'
# The full version, including alpha/beta/rc tags.
release = '2.2.5'
release = '2.2.6'

rst_epilog = """
.. |vrelease| replace:: v{release}
Expand Down
2 changes: 1 addition & 1 deletion tabbycat/draw/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _assemble_panel(adjs):
matchup = debate.matchup_codes if use_codes else debate.matchup
context = {
'ROUND': round.name,
'VENUE': debate.venue.name,
'VENUE': debate.venue.name if hasattr(debate, 'venue') else _("TBA"),
'PANEL': _assemble_panel(debate.adjudicators.with_positions()),
'DRAW': matchup
}
Expand Down
12 changes: 10 additions & 2 deletions tabbycat/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
# Version
# ==============================================================================

TABBYCAT_VERSION = '2.2.5'
TABBYCAT_VERSION = '2.2.6'
TABBYCAT_CODENAME = 'Khao Manee'
READTHEDOCS_VERSION = 'v2.2.5'
READTHEDOCS_VERSION = 'v2.2.6'

# ==============================================================================
# Internationalization and Localization
Expand Down Expand Up @@ -312,6 +312,14 @@
},
}

# ==============================================================================
# Dynamic preferences
# ==============================================================================

DYNAMIC_PREFERENCES = {
'REGISTRY_MODULE': 'preferences',
}

# ==============================================================================
# Heroku
# ==============================================================================
Expand Down
20 changes: 18 additions & 2 deletions tabbycat/standings/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,29 @@ def get_annotation(self, round=None):
annotation_filter = Q(
debateteam__teamscore__ballot_submission__confirmed=True,
debateteam__debate__round__stage=Round.STAGE_PRELIMINARY,
debateteam__teamscore__forfeit=False
debateteam__teamscore__forfeit=False,
debateteam__speakerscore__ghost=False
)
if round is not None:
annotation_filter &= Q(debateteam__speakerscore__position__lte=round.tournament.last_substantive_position)
annotation_filter &= Q(debateteam__debate__round__seq__lte=round.seq)

# `self.tournament` is only None if `queryset.first()` was None (see
# `get_annotated_queryset()` below), in which case the filter doesn't
# matter because the queryset is empty anyway.
if self.tournament is not None:
annotation_filter &= Q(debateteam__speakerscore__position__lte=self.tournament.last_substantive_position)

return Avg('debateteam__speakerscore__score', filter=annotation_filter)

def get_annotated_queryset(self, queryset, column_name, round=None):
if round is not None:
self.tournament = round.tournament
else:
first_team = queryset.first()
self.tournament = first_team.tournament if first_team is not None else None

return super().get_annotated_queryset(queryset, column_name, round)


class DrawStrengthMetricAnnotator(BaseMetricAnnotator):
"""Metric annotator for draw strength."""
Expand Down
1 change: 1 addition & 0 deletions tabbycat/standings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def get_context_data(self, **kwargs):
'debate_team__team__institution'
)
if self.tournament.pref('teams_in_debate') == 'bp':
team_scores.filter(debate_team__debate__round__stage=Round.STAGE_PRELIMINARY)
kwargs["top_team_scores"] = team_scores.order_by('-score')[:9]
kwargs["bottom_team_scores"] = team_scores.order_by('score')[:9]
else:
Expand Down

0 comments on commit 56018cd

Please sign in to comment.