fix: Pass value instead of array

(cherry picked from commit e1a9b61103e27099696ae4b186a6575b28c16b06)
This commit is contained in:
GangaManoj 2022-02-08 17:59:06 +05:30 committed by mergify-bot
parent 3d6ed4ebde
commit 5d3b65b944
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ frappe.ui.form.on('Asset Repair Consumed Item', {
},
callback: function(r) {
if(r.message) {
frappe.model.set_value(cdt, cdn, 'valuation_rate', r.message[0]);
frappe.model.set_value(cdt, cdn, 'valuation_rate', r.message);
}
}
});

View File

@ -272,7 +272,7 @@ def get_valuation_rate(item_code, warehouse):
)
if last_valuation_rate:
return last_valuation_rate
return last_valuation_rate[0]
else:
valuation_rate = frappe.db.get_value("Item", item_code, "valuation_rate")