Skip to content

Commit

Permalink
filter CC report wall of shame to just active members
Browse files Browse the repository at this point in the history
  • Loading branch information
alextannenbaum committed May 17, 2024
1 parent 9e9eb48 commit f25062f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def shame(request):
on a leaderboard.
"""
context = {}
worst_cc_report_forgetters = get_user_model().objects.annotate(Count('ccinstances', distinct=True)).annotate(
worst_cc_report_forgetters = get_user_model().objects.filter(groups__name='Active').annotate(Count('ccinstances', distinct=True)).annotate(
did_ccreport_count=Count(Case(When(ccinstances__event__ccreport__crew_chief=F('pk'), then=F('ccinstances'))),
distinct=True)).annotate(
failed_to_do_ccreport_count=(F('ccinstances__count') - F('did_ccreport_count'))).annotate(
Expand Down
2 changes: 1 addition & 1 deletion site_tmpl/users_shame.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Hall of Shame</h2>
<div class="col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Worst at doing CC reports</h3>
<h3 class="panel-title">Worst active members at doing CC reports</h3>
</div>
<table class="table">
<tr>
Expand Down

0 comments on commit f25062f

Please sign in to comment.