Skip to content

Commit

Permalink
fix: handle customer not found (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiyad committed Apr 18, 2023
1 parent bfb68fc commit c866352
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions helpdesk/helpdesk/doctype/hd_customer/hd_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ def get_contact_count(doc, event):
"parenttype": "Contact",
},
)
customer = frappe.get_doc("HD Customer", doc.links[0].link_name)
customer.contact_count = contact_count

customer.save()
try:
customer = frappe.get_doc("HD Customer", doc.links[0].link_name)
customer.contact_count = contact_count

customer.save()
except:
pass


def get_ticket_count(doc, event):
Expand Down

0 comments on commit c866352

Please sign in to comment.