fix: 'NoneType' object is not iterable

This commit is contained in:
Rohit Waghchaure 2019-12-07 14:10:11 +05:30
parent 690068142b
commit 502189913a

View File

@ -615,6 +615,9 @@ def get_items_for_material_requests(doc, ignore_existing_ordered_qty=None):
doc['mr_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')
warehouse = doc.get('for_warehouse')