From 534f43872f15ed4680821bd19980f011dbd9cbb7 Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@gmail.com>
Date: Thu, 12 Nov 2020 20:14:10 +1100
Subject: [PATCH] Bug fix for SupplierPart table

---
 InvenTree/templates/js/company.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InvenTree/templates/js/company.js b/InvenTree/templates/js/company.js
index 164329aee4..388a79668b 100644
--- a/InvenTree/templates/js/company.js
+++ b/InvenTree/templates/js/company.js
@@ -187,7 +187,7 @@ function loadSupplierPartTable(table, url, options) {
                 field: 'manufacturer',
                 title: '{% trans "Manufacturer" %}',
                 formatter: function(value, row, index, field) {
-                    if (value) {
+                    if (value && row.manufacturer_detail) {
                         var name = row.manufacturer_detail.name;
                         var url = `/company/${value}/`;
                         var html = imageHoverIcon(row.manufacturer_detail.image) + renderLink(name, url);