Skip to content

Commit

Permalink
Merge pull request #43287 from frappe/mergify/bp/version-15/pr-43279
Browse files Browse the repository at this point in the history
fix: create_address is failing while creating customer (backport #43279)
  • Loading branch information
ruthra-kumar authored Sep 19, 2024
2 parents 479e857 + 17ad402 commit 42e4b8a
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 42e4b8a

Please sign in to comment.