I am trying to do the following in my template:
{% for user in users %}
<td >{{ addresses|selectattr('priority','equalto', 1)|selectattr('User','equalto', '{{user.name}}')|list|length }}</td>
{% endfor %}
But for some reason I am getting 0 values in the output. If I remove the
selectattr('User','equalto', '{{user.name}}')
everything seems to be working fine but without the filter by user.name.
Any idea what might be going wrong here?