mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 21:16:46 +00:00
(cherry picked from commit bf8a59c6046575f74b74502a16ff3ad2ef0c8ac0)
This commit is contained in:
parent
40c74c7563
commit
67e0a99012
@ -1758,13 +1758,11 @@ function loadPartTable(table, url, options={}) {
|
||||
field: 'category_detail',
|
||||
title: '{% trans "Category" %}',
|
||||
formatter: function(value, row) {
|
||||
|
||||
var text = shortenString(row.category_detail.pathstring);
|
||||
|
||||
if (row.category) {
|
||||
if (row.category && row.category_detail) {
|
||||
var text = shortenString(row.category_detail.pathstring);
|
||||
return withTitle(renderLink(text, `/part/category/${row.category}/`), row.category_detail.pathstring);
|
||||
} else {
|
||||
return '{% trans "No category" %}';
|
||||
return '<em>{% trans "No category" %}</em>';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user