Skip to content

Commit

Permalink
fix: create_address is failing
Browse files Browse the repository at this point in the history
(cherry picked from commit acc1d52)
  • Loading branch information
shariquerik authored and mergify[bot] committed Sep 18, 2024
1 parent 680354a commit 557ef5d
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 557ef5d

Please sign in to comment.