From 68fd2d83cc366d0b53fae8c210210f903e4a6b88 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 31 2019 20:04:21 +0000 Subject: Fix the total number of members on the repo info page This commit basically ports the fix from Ryan Lerch in 56c765f85c7944f7eaad1569f47b89df6571eb7f to the srcfpo theme so both themes show the correct number of members on a project. Fixes https://pagure.io/pagure/issue/4225 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html index 3d920eb..0da6e08 100644 --- a/pagure/themes/srcfpo/templates/repo_info.html +++ b/pagure/themes/srcfpo/templates/repo_info.html @@ -237,7 +237,15 @@ Members - {{ repo.contributors|length+1 }} + {# the +1 here is for the main admin that is not listed in repo.contributors #} + {% set memberstotal = repo.contributors['admin']|length + + repo.contributors['commit']|length + + repo.contributors['ticket']|length + + repo.contributor_groups['admin']|length + + repo.contributor_groups['commit']|length + + repo.contributor_groups['ticket']|length + 1 %} + {{ memberstotal }} +