[fix] [patch] rename_company_sales_target_field.py
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 8c54283..5433eb6 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 @@
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")