Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix getting payment total in index view

Marcin Gębalafac46514d4b9
diff --git a/saleor/dashboard/templates/dashboard/index.html b/saleor/dashboard/templates/dashboard/index.html
index 04f88f087d..8e6fa2a647 100644
--- a/saleor/dashboard/templates/dashboard/index.html
+++ b/saleor/dashboard/templates/dashboard/index.html
@@ -30,7 +30,7 @@
<td>{{ payment.variant }}</td>
<td>{{ payment.created }}</td>
<td>{{ payment.order.user|default:"Anonymous" }}</td>
- <td>{% gross payment.total %}</td>
+ <td>{% gross payment.get_total_price %}</td>
</tr>
{% endfor %}
</tbody>
diff --git a/saleor/dashboard/views.py b/saleor/dashboard/views.py
index 4691962544..c553a1561f 100644
--- a/saleor/dashboard/views.py
+++ b/saleor/dashboard/views.py
@@ -54,7 +54,5 @@ class FilterByStatusMixin(object):
def index(request):
orders_to_ship = Order.objects.filter(status='fully-paid')
payments = Payment.objects.filter(status='preauth').order_by('-created')
- for payment in payments:
- payment.total = Price(payment.total, currency=payment.currency)
ctx = {'preauthorized_payments': payments, 'orders_to_ship': orders_to_ship}
return TemplateResponse(request, 'dashboard/index.html', ctx)