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