From e42fb32f6fe9ee27fb47ee7b2442be922822906e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 20 Apr 2017 08:45:09 +0530 Subject: [PATCH] Fixed allow_zero_valuation_rate patch --- .../v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py b/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py index 744cfed998..e517df5fdb 100644 --- a/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py +++ b/erpnext/patches/v8_0/rename_is_sample_item_to_allow_zero_valuation_rate.py @@ -9,4 +9,5 @@ def execute(): for doctype in doc_list: frappe.reload_doctype(doctype) - rename_field(doctype, "is_sample_item", "allow_zero_valuation_rate") \ No newline at end of file + if "is_sample_item" in frappe.db.get_table_columns(doctype): + rename_field(doctype, "is_sample_item", "allow_zero_valuation_rate") \ No newline at end of file