mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added warning message for missing model information
This commit is contained in:
parent
c3ef8d2dfb
commit
25a01be995
@ -726,8 +726,9 @@ function initializeRelatedField(name, field, options) {
|
||||
// If the 'model' is specified, hand it off to the custom model render
|
||||
return renderModelData(name, field.model, item, field, options);
|
||||
} else {
|
||||
// Simply render the 'text' parameter
|
||||
return item.text;
|
||||
// Return a simple renderering
|
||||
console.log(`WARNING: templateResult() missing 'field.model' for '${name}'`);
|
||||
return `${name} - ${item.id}`;
|
||||
}
|
||||
},
|
||||
templateSelection: function(item, container) {
|
||||
@ -736,8 +737,9 @@ function initializeRelatedField(name, field, options) {
|
||||
// If the 'model' is specified, hand it off to the custom model render
|
||||
return renderModelData(name, field.model, item, field, options);
|
||||
} else {
|
||||
// Simply render the 'text' parameter
|
||||
return item.text;
|
||||
// Return a simple renderering
|
||||
console.log(`WARNING: templateSelection() missing 'field.model' for '${name}'`);
|
||||
return `${name} - ${item.id}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user