From 6ef741554c03325140a1e2bfba802560a78e80bd Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 6 Sep 2017 10:53:00 +0530 Subject: [PATCH] [fix] [patch] rename_company_sales_target_field.py --- erpnext/patches/v8_9/rename_company_sales_target_field.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v8_9/rename_company_sales_target_field.py b/erpnext/patches/v8_9/rename_company_sales_target_field.py index 8c54283ed7..5433eb673e 100644 --- a/erpnext/patches/v8_9/rename_company_sales_target_field.py +++ b/erpnext/patches/v8_9/rename_company_sales_target_field.py @@ -4,4 +4,5 @@ from frappe.model.utils.rename_field import rename_field def execute(): frappe.reload_doc("setup", "doctype", "company") - rename_field("Company", "sales_target", "monthly_sales_target") + if frappe.db.has_column('Company', 'sales_target'): + rename_field("Company", "sales_target", "monthly_sales_target")