From c40451ee2efe93c4bfddb99469fe489f3c947f74 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 14 Oct 2014 12:12:40 +0530 Subject: [PATCH] Patch Fixed --- erpnext/patches/v4_2/recalculate_bom_cost.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v4_2/recalculate_bom_cost.py b/erpnext/patches/v4_2/recalculate_bom_cost.py index 418f42313c..3a194ff195 100644 --- a/erpnext/patches/v4_2/recalculate_bom_cost.py +++ b/erpnext/patches/v4_2/recalculate_bom_cost.py @@ -5,12 +5,12 @@ from __future__ import unicode_literals import frappe def execute(): - try: - for d in frappe.db.sql("select name from `tabBOM` where docstatus < 2"): + for d in frappe.db.sql("select name from `tabBOM` where docstatus < 2"): + try: document = frappe.get_doc('BOM', d[0]) if document.docstatus == 1: document.ignore_validate_update_after_submit = True document.calculate_cost() document.save() - except: - pass \ No newline at end of file + except: + pass \ No newline at end of file