Skip to content

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

Check existence of the product

Adam Bogdal37526d552232
diff --git a/saleor/dashboard/templates/dashboard/order/detail.html b/saleor/dashboard/templates/dashboard/order/detail.html
index 90b1e52057..d0b2eeb055 100644
--- a/saleor/dashboard/templates/dashboard/order/detail.html
+++ b/saleor/dashboard/templates/dashboard/order/detail.html
@@ -49,7 +49,7 @@
<tbody>
{% for item in group.items.all %}
<tr>
- <td><a href="{% url "dashboard:product-update" pk=item.product_id %}">{{ item.product }}</a></td>
+ <td>{% if item.product %}<a href="{% url "dashboard:product-update" pk=item.product.id %}">{{ item.product }}</a>{% else %}{{ item.product_name }}{% endif %}</td>
<td>{{ item.product_name }}</td>
<td>{{ item.product_sku }}</td>
<td>{% gross item.get_price_per_item %}</td>