diff --git a/erpnext/patches/v13_0/update_member_email_address.py b/erpnext/patches/v13_0/update_member_email_address.py index 38843e31bf..4056f84069 100644 --- a/erpnext/patches/v13_0/update_member_email_address.py +++ b/erpnext/patches/v13_0/update_member_email_address.py @@ -19,4 +19,5 @@ def execute(): # Set the value for it frappe.db.set_value("Member", member, "email_id", email) - rename_field("Membership Settings", "enable_auto_invoicing", "enable_invoicing") + if frappe.db.exists("DocType", "Membership Settings"): + rename_field("Membership Settings", "enable_auto_invoicing", "enable_invoicing")