fix: at create_customer_or_supplier on session creation
diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py
index 7be8c5d..c8b03e6 100644
--- a/erpnext/portal/utils.py
+++ b/erpnext/portal/utils.py
@@ -102,7 +102,7 @@
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)