From a62a11044ab2a31a56e6e15773f435333232d7df Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 18 Apr 2019 12:33:04 +0530 Subject: [PATCH 1/2] fix: On assignment, system sending an email to the assigned user even if notify to email is disabled --- frappe/desk/form/assign_to.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/desk/form/assign_to.py b/frappe/desk/form/assign_to.py index 4b3a607ec5..38856d5068 100644 --- a/frappe/desk/form/assign_to.py +++ b/frappe/desk/form/assign_to.py @@ -7,6 +7,7 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.form.document_follow import follow_document +from frappe.utils import cint import frappe.share class DuplicateToDoError(frappe.ValidationError): pass @@ -177,7 +178,7 @@ def notify_assignment(assigned_by, owner, doc_type, doc_name, action='CLOSE', 'notify': notify } - if arg and arg.get("notify"): + if arg and cint(arg.get("notify")): _notify(arg) def _notify(args): From 3c01d85a3f5b873cf1eedd2f8906304cecdc79a7 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 18 Apr 2019 13:16:05 +0530 Subject: [PATCH 2/2] fix: User not able to make lead from the communication --- frappe/email/inbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/inbox.py b/frappe/email/inbox.py index 9df4218d71..0ff3a4ddd8 100644 --- a/frappe/email/inbox.py +++ b/frappe/email/inbox.py @@ -145,7 +145,7 @@ def make_lead_from_communication(communication, ignore_communication_links=False lead_name = None if doc.sender: lead_name = frappe.db.get_value("Lead", {"email_id": doc.sender}) - if not lead_name and doc.mobile_no: + if not lead_name and doc.phone_no: lead_name = frappe.db.get_value("Lead", {"mobile_no": doc.phone_no}) if not lead_name: lead = frappe.get_doc({