From f83459619766c83754a2b8b43c167dcd5de23615 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 23 Jul 2022 23:09:28 +0200 Subject: [PATCH] Fix template --- app/templates/utils.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/utils.html b/app/templates/utils.html index 38058cc..5311ed0 100644 --- a/app/templates/utils.html +++ b/app/templates/utils.html @@ -292,7 +292,8 @@ {% endif %} {% if object.ap_type == "Question" %} - {% if is_admin and object.is_from_inbox and not object.is_poll_ended and not object.voted_for_answers %} + {% set can_vote = is_admin and object.is_from_inbox and not object.is_poll_ended and not object.voted_for_answers %} + {% if can_vote %}
{{ embed_csrf_token() }} {{ embed_redirect_url(object.permalink_id) }} @@ -304,7 +305,6 @@ {% for item in object.poll_items %}
  • {% set pct = item | poll_item_pct(object.ap_object.votersCount) %} - {% set can_vote = is_admin and object.is_from_inbox and not object.is_poll_ended and not object.voted_for_answers %}

    {% if can_vote %}