From 15e3b7f218cd881d28f616a6286dca27a5223744 Mon Sep 17 00:00:00 2001 From: kunhi Date: Tue, 13 Dec 2022 12:41:56 +0400 Subject: [PATCH] fix: at create_customer_or_supplier on session creation --- erpnext/portal/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py index 7be8c5df18..c8b03e678b 100644 --- a/erpnext/portal/utils.py +++ b/erpnext/portal/utils.py @@ -102,7 +102,7 @@ def create_party_contact(doctype, fullname, user, party_name): contact = frappe.new_doc("Contact") contact.update({"first_name": fullname, "email_id": user}) contact.append("links", dict(link_doctype=doctype, link_name=party_name)) - contact.append("email_ids", dict(email_id=user)) + contact.append("email_ids", dict(email_id=user, is_primary=True)) contact.flags.ignore_mandatory = True contact.insert(ignore_permissions=True)