Verified Commit 9d221604 authored by Kevin Morris's avatar Kevin Morris
Browse files

fix(routers.trusted_user): fix proposal participation percentage

Closes #238



Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 902c4d7a
Pipeline #14354 waiting for manual action with stages
in 4 minutes and 58 seconds
......@@ -125,8 +125,8 @@ def render_proposal(request: Request,
context["voteinfo"] = voteinfo
context["voters"] = voters.all()
participation = voteinfo.ActiveTUs / voteinfo.total_votes() \
if voteinfo.total_votes() else 0
total = voteinfo.total_votes()
participation = (total / voteinfo.ActiveTUs) if total else 0
context["participation"] = participation
accepted = (voteinfo.Yes > voteinfo.ActiveTUs / 2) or \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment