mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Catch potential errors when rendering manufacturerpart in form (#4501)
This commit is contained in:
parent
a0352f9eb6
commit
bb4b1bf9cc
@ -399,8 +399,13 @@ function renderManufacturerPart(name, data, parameters={}, options={}) {
|
|||||||
html += select2Thumbnail(manufacturer_image);
|
html += select2Thumbnail(manufacturer_image);
|
||||||
html += select2Thumbnail(part_image);
|
html += select2Thumbnail(part_image);
|
||||||
|
|
||||||
html += ` <span><b>${data.manufacturer_detail.name}</b> - ${data.MPN}</span>`;
|
if (data.manufacturer_detail) {
|
||||||
html += ` - <i>${data.part_detail.full_name}</i>`;
|
html += ` <span><b>${data.manufacturer_detail.name}</b> - ${data.MPN}</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.part_detail) {
|
||||||
|
html += ` - <i>${data.part_detail.full_name}</i>`;
|
||||||
|
}
|
||||||
|
|
||||||
html += renderId('{% trans "Manufacturer Part ID" %}', data.pk, parameters);
|
html += renderId('{% trans "Manufacturer Part ID" %}', data.pk, parameters);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user