From 2c08672f156b4a45f67415b6fe047e995ce700de Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 4 Feb 2022 16:50:27 -0800 Subject: [PATCH] fix: participation display generation should check voteinfo.ActiveTUs Signed-off-by: Kevin Morris --- aurweb/routers/trusted_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aurweb/routers/trusted_user.py b/aurweb/routers/trusted_user.py index 07ee17af..2dc5b4f7 100644 --- a/aurweb/routers/trusted_user.py +++ b/aurweb/routers/trusted_user.py @@ -118,7 +118,7 @@ def render_proposal(request: Request, context: dict, proposal: int, context["voters"] = voters.all() total = voteinfo.total_votes() - participation = (total / voteinfo.ActiveTUs) if total else 0 + participation = (total / voteinfo.ActiveTUs) if voteinfo.ActiveTUs else 0 context["participation"] = participation accepted = (voteinfo.Yes > voteinfo.ActiveTUs / 2) or \