From d38160c81630d38a95efa47ee95f0b27f0a166cf Mon Sep 17 00:00:00 2001 From: Govind S Menokee Date: Tue, 18 Sep 2018 10:42:21 +0530 Subject: [PATCH] [FIX] Remove deprecated gen_object.next() function (#15418) BOM tree view was getting impacted due to use of a deprecated function. This fix replaces deprecated object.next() function with next(gen_object). --- erpnext/manufacturing/doctype/bom/bom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 7ad5a7fb17..38e6156b03 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -661,8 +661,8 @@ def get_children(doctype, parent=None, is_root=False, **filters): # extend bom_item dict with respective item dict bom_item.update( # returns an item dict from items list which matches with item_code - (item for item in items if item.get('name') - == bom_item.get('item_code')).next() + next(item for item in items if item.get('name') + == bom_item.get('item_code')) ) bom_item.expandable = 0 if bom_item.value in ('', None) else 1