fix: 'NoneType' object is not iterable
This commit is contained in:
parent
690068142b
commit
502189913a
@ -615,6 +615,9 @@ def get_items_for_material_requests(doc, ignore_existing_ordered_qty=None):
|
|||||||
|
|
||||||
doc['mr_items'] = []
|
doc['mr_items'] = []
|
||||||
po_items = doc.get('po_items') if doc.get('po_items') else doc.get('items')
|
po_items = doc.get('po_items') if doc.get('po_items') else doc.get('items')
|
||||||
|
if not po_items:
|
||||||
|
frappe.throw(_("Items are required to pull the raw materials which is associated with it."))
|
||||||
|
|
||||||
company = doc.get('company')
|
company = doc.get('company')
|
||||||
warehouse = doc.get('for_warehouse')
|
warehouse = doc.get('for_warehouse')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user