2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-16 01:36:29 +00:00

Fixes for table rendering (#5782)

- Handle case where related object does not exist in the dataset
This commit is contained in:
Oliver
2023-10-25 11:45:00 +11:00
committed by GitHub
parent 8308f36923
commit dfc4fa7584
3 changed files with 11 additions and 5 deletions

View File

@@ -3062,8 +3062,10 @@ function loadInstalledInTable(table, options) {
formatter: function(value, row) {
var html = '';
html += imageHoverIcon(row.part_detail.thumbnail);
html += renderLink(row.part_detail.full_name, `/stock/item/${row.pk}/`);
if (row.part_detail) {
html += imageHoverIcon(row.part_detail.thumbnail);
html += renderLink(row.part_detail.full_name, `/stock/item/${row.pk}/`);
}
return html;
}