fix: Don't use an uninitialized variable (#4771)

This commit is contained in:
Paul Selkirk 2023-06-05 21:10:08 -04:00
parent 4051ac8c85
commit 1ad2e6bd59

View file

@ -31,9 +31,9 @@
{% for np in p.nomineeposition_set.accepted.not_duplicated %}
<a class="btn btn-primary position-relative"
{% if nomcom.group.state_id != 'conclude' %}href="?nominee={{ np.nominee.id }}&amp;position={{ np.position.id }}"{% endif %}
title="{% if count %}{{ count }} earlier comment{{ count|pluralize }} from you {% else %}You have not yet provided feedback {% endif %} on {{ np.nominee.email.address }} as {{ np.position }}">
{{ np.nominee.name }}
{% with count=counts|lookup:np.position.id|lookup:np.nominee.id %}
title="{% if count %}{{ count }} earlier comment{{ count|pluralize }} from you {% else %}You have not yet provided feedback {% endif %} on {{ np.nominee.email.address }} as {{ np.position }}">
{{ np.nominee.name }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
{{ count | default:"0" }}
</span>
@ -99,4 +99,4 @@
</div>
</div>
{% endif %}
{% endblock %}
{% endblock %}