Commit 97c1247b authored by Kevin Morris's avatar Kevin Morris
Browse files

/tu/{proposal_id}: Do not show voters if there are none



This was different than PHP.

Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 04ab9890
Pipeline #9056 passed with stage
in 1 minute and 57 seconds
......@@ -111,7 +111,7 @@ def render_proposal(request: Request,
""" Render a single TU proposal. """
context["proposal"] = proposal
context["voteinfo"] = voteinfo
context["voters"] = voters
context["voters"] = voters.all()
participation = voteinfo.ActiveTUs / voteinfo.total_votes() \
if voteinfo.total_votes() else 0
......
......@@ -4,10 +4,12 @@
<div class="box">
{% include "partials/tu/proposal/details.html" %}
</div>
<div class="box">
{% include "partials/tu/proposal/voters.html" %}
</div>
{% if voters %}
<div class="box">
{% include "partials/tu/proposal/voters.html" %}
</div>
{% endif %}
<div class="box">
{% if error %}
......
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