Skip to content

Commit

Permalink
Merge pull request #43281 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-43279

fix: create_address is failing while creating customer (backport #43279)
  • Loading branch information
shariquerik authored Sep 18, 2024
2 parents 680354a + 557ef5d commit 953b579
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/crm/frappe_crm_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def create_contacts(contacts, organization=None, link_doctype=None, link_docname
def create_address(doctype, docname, address):
if not address:
return
if isinstance(address, str):
address = json.loads(address)
try:
_address = frappe.db.exists("Address", address.get("name"))
if not _address:
Expand All @@ -105,6 +107,7 @@ def create_address(doctype, docname, address):
"address_line1",
"address_line2",
"city",
"county",
"state",
"pincode",
"country",
Expand Down

0 comments on commit 953b579

Please sign in to comment.