Fix for potential NoReverseMatch error (#5440)

- Check that the database model really does exist in the template code
This commit is contained in:
Oliver 2023-08-14 14:26:01 +10:00 committed by GitHub
parent 9a8c8961e4
commit a8118ed406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,7 +368,11 @@
<tr>
<td><span class='fas fa-th-list'></span></td>
<td>{% trans "Sales Order" %}</td>
<td><a href="{% url 'so-detail' item.sales_order.id %}">{{ item.sales_order.reference }}</a> - <a href="{% url 'company-detail' item.sales_order.customer.id %}">{{ item.sales_order.customer.name }}</a></td>
<td>
<a href="{% url 'so-detail' item.sales_order.id %}">{{ item.sales_order.reference }}</a>
{% if item.sales_order.customer %}
- <a href="{% url 'company-detail' item.sales_order.customer.id %}">{{ item.sales_order.customer.name }}</a></td>
{% endif %}
</tr>
{% else %}
{% if allocated_to_sales_orders %}