Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix rendering payments without an order
Marcin Gębalab90aada52215
diff --git a/templates/dashboard/index.html b/templates/dashboard/index.htmlindex c680d9a8fa..295266170e 100644--- a/templates/dashboard/index.html+++ b/templates/dashboard/index.html@@ -104,20 +104,22 @@</thead><tbody>{% for payment in preauthorized_payments %}- <tr data-action-go="{% url "dashboard:order-details" order_pk=payment.order.pk %}">- <td>- {{ payment.order }}- </td>- <td>- {{ payment.created }}- </td>- <td>- {{ payment.order.user|default:_("Guest") }}- </td>- <td class="right-align">- {% price payment.get_total %}- </td>- </tr>+ {% if payment.order %}+ <tr data-action-go="{% url "dashboard:order-details" order_pk=payment.order.pk %}">+ <td>+ {{ payment.order }}+ </td>+ <td>+ {{ payment.created }}+ </td>+ <td>+ {{ payment.order.user|default:_("Guest") }}+ </td>+ <td class="right-align">+ {% price payment.get_total %}+ </td>+ </tr>+ {% endif %}{% endfor %}</tbody></table>