Skip to content

Commit

Permalink
Fix for potential NoReverseMatch error (#5440) (#5442)
Browse files Browse the repository at this point in the history
- Check that the database model really does exist in the template code

(cherry picked from commit a8118ed)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
  • Loading branch information
github-actions[bot] and SchrodingersGat committed Aug 14, 2023
1 parent df8c269 commit 3b238fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion InvenTree/stock/templates/stock/item_base.html
Expand Up @@ -368,7 +368,11 @@ <h5>{% if item.quantity != available %}{% decimal available %} / {% endif %}{% d
<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 %}
Expand Down

0 comments on commit 3b238fd

Please sign in to comment.