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