From 81449ece54aacd7cbe1d62c9a37f6719b6ac3b28 Mon Sep 17 00:00:00 2001 From: Pranav Nachanekar Date: Wed, 18 Sep 2019 14:33:40 +0530 Subject: [PATCH] fix:Linking lead --- erpnext/www/book-appointment/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/www/book-appointment/index.py b/erpnext/www/book-appointment/index.py index 6f6d4ac45c..e238bd5205 100644 --- a/erpnext/www/book-appointment/index.py +++ b/erpnext/www/book-appointment/index.py @@ -102,9 +102,9 @@ def create_appointment(date, time, contact): appointment.insert() def find_lead_by_email(email): - lead_list = frappe.get_list('Lead',filters={'email_id':email})[0] + lead_list = frappe.get_list('Lead',filters={'email_id':email},ignore_permissions=True) if lead_list: - return lead_list + return lead_list[0] frappe.throw('Email ID not associated with any Lead. Please make sure to use the email address you got this mail on') # Helper Functions