don't change lead if assigned

This commit is contained in:
0Pranav 2019-11-07 12:37:28 +05:30
parent 6f1d2eeffd
commit fce8f36bb2

View File

@ -31,6 +31,7 @@ class Appointment(Document):
if(number_of_appointments_in_same_slot >= number_of_agents): if(number_of_appointments_in_same_slot >= number_of_agents):
frappe.throw('Time slot is not available') frappe.throw('Time slot is not available')
# Link lead # Link lead
if not self.lead:
self.lead = self.find_lead_by_email() self.lead = self.find_lead_by_email()
def after_insert(self): def after_insert(self):
@ -56,6 +57,7 @@ class Appointment(Document):
template=template, template=template,
args=args, args=args,
subject=_('Appointment Confirmation')) subject=_('Appointment Confirmation'))
if frappe.session.user == "Guest":
frappe.msgprint( frappe.msgprint(
'Please check your email to confirm the appointment') 'Please check your email to confirm the appointment')