From 183d87a73caadcf6d46a49397262e263ec4b54a8 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 10 Sep 2019 13:52:35 +0530 Subject: [PATCH] fix: Fallback for first_name, last_name --- frappe/core/doctype/communication/communication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 6db113b0d1..9e2587bc82 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -172,7 +172,7 @@ class Communication(Document): first_name, last_name = frappe.db.get_value('Contact', filters={'email_id': sender_email}, fieldname=['first_name', 'last_name'] - ) + ) or [None, None] self.sender_full_name = (first_name or '') + (last_name or '') if not self.sender_full_name: