2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 02:25:38 +00:00

fix: don't link manufacturer part if it doesn't have one

This commit is contained in:
Nigel
2021-04-15 16:28:50 -06:00
parent 3e6429cb13
commit 6f00c662a1

View File

@ -182,7 +182,11 @@ $("#po-table").inventreeTable({
field: 'supplier_part_detail.MPN',
title: '{% trans "MPN" %}',
formatter: function(value, row, index, field) {
return renderLink(value, `/manufacturer-part/${row.supplier_part_detail.manufacturer_part.pk}/`);
if (row.supplier_part_detail.manufacturer_part) {
return renderLink(value, `/manufacturer-part/${row.supplier_part_detail.manufacturer_part.pk}/`);
} else {
return "";
}
},
},
{