Bug fix train_row macro

This commit is contained in:
Edward Betts 2024-10-01 10:42:31 +01:00
parent d2c6a778e3
commit 02fd6dbbe6

View file

@ -226,7 +226,7 @@
<div class="grid-item text-end"> <div class="grid-item text-end">
{% if g.user.is_authenticated and item.price and item.currency %} {% if g.user.is_authenticated and item.price and item.currency %}
<span class="badge bg-info text-nowrap">{{ "{:,f}".format(item.price) }} {{ item.currency }}</span> <span class="badge bg-info text-nowrap">{{ "{:,f}".format(item.price) }} {{ item.currency }}</span>
{% if item.currency != "GBP" %} {% if item.currency != "GBP" and item.currency in fx_rate %}
<span class="badge bg-info text-nowrap">{{ "{:,.2f}".format(item.price / fx_rate[item.currency]) }} GBP</span> <span class="badge bg-info text-nowrap">{{ "{:,.2f}".format(item.price / fx_rate[item.currency]) }} GBP</span>
{% endif %} {% endif %}
{% endif %} {% endif %}