From d36c6068b281f73110117bb5965f436cb4ae1569 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 8 Nov 2019 14:43:53 +0530 Subject: [PATCH] fix: 'NoneType' object has no attribute 'stock_uom' (#19532) --- erpnext/stock/doctype/pick_list/pick_list.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.js b/erpnext/stock/doctype/pick_list/pick_list.js index 3f66743f07..278971125f 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.js +++ b/erpnext/stock/doctype/pick_list/pick_list.js @@ -173,8 +173,10 @@ frappe.ui.form.on('Pick List Item', { }); function get_item_details(item_code, uom=null) { - return frappe.xcall('erpnext.stock.doctype.pick_list.pick_list.get_item_details', { - item_code, - uom - }); + if (item_code) { + return frappe.xcall('erpnext.stock.doctype.pick_list.pick_list.get_item_details', { + item_code, + uom + }); + } } \ No newline at end of file