mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-15 08:17:15 +00:00
fix:add exception for no opportunity
This commit is contained in:
@@ -142,6 +142,8 @@ class Appointment(Document):
|
||||
'party_name': self.lead,
|
||||
},
|
||||
order_by='creation desc')
|
||||
if not opporutnities:
|
||||
return None
|
||||
latest_opportunity = frappe.get_doc(
|
||||
'Opportunity', opporutnities[0].name)
|
||||
assignee = latest_opportunity._assign
|
||||
|
||||
Reference in New Issue
Block a user