mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 05:29:18 +00:00
fix: 'NoneType' object is not iterable (#21537)
This commit is contained in:
@@ -342,8 +342,14 @@ def get_basic_details(args, item, overwrite_warehouse=True):
|
|||||||
out["manufacturer_part_no"] = None
|
out["manufacturer_part_no"] = None
|
||||||
out["manufacturer"] = None
|
out["manufacturer"] = None
|
||||||
else:
|
else:
|
||||||
out["manufacturer"], out["manufacturer_part_no"] = frappe.get_value("Item", item.name,
|
data = frappe.get_value("Item", item.name,
|
||||||
["default_item_manufacturer", "default_manufacturer_part_no"] )
|
["default_item_manufacturer", "default_manufacturer_part_no"] , as_dict=1)
|
||||||
|
|
||||||
|
if data:
|
||||||
|
out.update({
|
||||||
|
"manufacturer": data.default_item_manufacturer,
|
||||||
|
"manufacturer_part_no": data.default_manufacturer_part_no
|
||||||
|
})
|
||||||
|
|
||||||
child_doctype = args.doctype + ' Item'
|
child_doctype = args.doctype + ' Item'
|
||||||
meta = frappe.get_meta(child_doctype)
|
meta = frappe.get_meta(child_doctype)
|
||||||
|
|||||||
Reference in New Issue
Block a user