From 0f590c95262e836e7f4a35049c08f46ab6102b35 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Thu, 9 Jul 2020 02:10:39 +0200 Subject: [PATCH] Include submissions with no value. --- .../funds/templates/funds/includes/submission_stats.html | 2 +- hypha/apply/funds/views.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hypha/apply/funds/templates/funds/includes/submission_stats.html b/hypha/apply/funds/templates/funds/includes/submission_stats.html index eab3c0a12..d0a68dfd1 100644 --- a/hypha/apply/funds/templates/funds/includes/submission_stats.html +++ b/hypha/apply/funds/templates/funds/includes/submission_stats.html @@ -10,7 +10,7 @@ <h5>Submissions</h5> <table> <tr><th>Applied</th><th>Accepted</th><th>Pending</th></tr> - <tr><td>{{ submission_count|default:"0" }}</td><td>{{ submission_accepted_count|default:"0" }}</td><td>{{ submission_undetermined_count|default:"0" }}</td></tr> + <tr><td>{{ object_list.count }}</td><td>{{ submission_accepted_count|default:"0" }}</td><td>{{ submission_undetermined_count|default:"0" }}</td></tr> </table> </div> <div class="stat-block__item"> diff --git a/hypha/apply/funds/views.py b/hypha/apply/funds/views.py index 70229bcc0..d598becb7 100644 --- a/hypha/apply/funds/views.py +++ b/hypha/apply/funds/views.py @@ -115,9 +115,10 @@ class SubmissionStatsMixin: submission_sum = intcomma(submission_value.get('value__sum')) submission_count = submission_value.get('value__count') - submission_accepted_value = submissions.current_accepted().value() + submission_accepted = submissions.current_accepted() + submission_accepted_value = submission_accepted.value() submission_accepted_sum = intcomma(submission_accepted_value.get('value__sum')) - submission_accepted_count = submission_accepted_value.get('value__count') + submission_accepted_count = submission_accepted.count() reviews = Review.objects.all() review_count = reviews.count() -- GitLab