mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(routers.trusted_user): fix proposal participation percentage
Closes #238 Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
902c4d7a9c
commit
9d221604b4
1 changed files with 2 additions and 2 deletions
|
@ -125,8 +125,8 @@ def render_proposal(request: Request,
|
||||||
context["voteinfo"] = voteinfo
|
context["voteinfo"] = voteinfo
|
||||||
context["voters"] = voters.all()
|
context["voters"] = voters.all()
|
||||||
|
|
||||||
participation = voteinfo.ActiveTUs / voteinfo.total_votes() \
|
total = voteinfo.total_votes()
|
||||||
if voteinfo.total_votes() else 0
|
participation = (total / voteinfo.ActiveTUs) if total else 0
|
||||||
context["participation"] = participation
|
context["participation"] = participation
|
||||||
|
|
||||||
accepted = (voteinfo.Yes > voteinfo.ActiveTUs / 2) or \
|
accepted = (voteinfo.Yes > voteinfo.ActiveTUs / 2) or \
|
||||||
|
|
Loading…
Add table
Reference in a new issue