Merge pull request #33315 from kunhimohamed/develop

fix: at create_customer_or_supplier on session creation
This commit is contained in:
Deepesh Garg 2022-12-16 15:04:10 +05:30 committed by GitHub
commit 50421b3d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)