diff --git a/erpnext/patches/v4_4/make_email_accounts.py b/erpnext/patches/v4_4/make_email_accounts.py index dd74fc97cd7..33f2c3f1361 100644 --- a/erpnext/patches/v4_4/make_email_accounts.py +++ b/erpnext/patches/v4_4/make_email_accounts.py @@ -78,7 +78,7 @@ def insert_or_update(account): account.insert() except frappe.NameError, e: if e.args[0]=="Email Account": - existing_account = frappe.get_doc("Email Account", e.args[0]) + existing_account = frappe.get_doc("Email Account", e.args[1]) for key, value in account.as_dict().items(): if not existing_account.get(key) and value \ and key not in default_fields \