mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix for BOM import (#7515)
This commit is contained in:
parent
937824dceb
commit
e920165901
@ -2248,11 +2248,12 @@ function initializeRelatedField(field, fields, options={}) {
|
||||
*/
|
||||
function setRelatedFieldData(name, data, options={}) {
|
||||
|
||||
var select = getFormFieldElement(name, options);
|
||||
let select = getFormFieldElement(name, options);
|
||||
|
||||
const pkField = options?.fields[name]?.pk_field ?? 'pk';
|
||||
let fields = options?.fields ?? {};
|
||||
let pkField = fields[name]?.pk_field ?? 'pk';
|
||||
|
||||
var option = new Option(name, data[pkField], true, true);
|
||||
let option = new Option(name, data[pkField], true, true);
|
||||
|
||||
// Assign the JSON data to the 'instance' attribute,
|
||||
// so we can access and render it later
|
||||
|
Loading…
Reference in New Issue
Block a user