Skip to content

Commit

Permalink
fix: check for presence of contact
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitbhanushali committed May 13, 2024
1 parent 361b6f5 commit 01385a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,13 @@ def set_customer(self):
# Skip if `Customer` is already set
if self.customer:
return
customer = get_customer(self.contact)

# let agent assign the customer when one contact has more than one customer
if len(customer) == 1:
self.customer = customer[0]
if self.contact:
customer = get_customer(self.contact)

# let agent assign the customer when one contact has more than one customer
if len(customer) == 1:
self.customer = customer[0]

def set_priority(self):
if self.priority:
Expand Down

0 comments on commit 01385a8

Please sign in to comment.