From 2dd43c345cea6e511bcc9e1ad2c1f6f542883f39 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 10 Dec 2012 14:58:39 +0530 Subject: [PATCH 1/2] Update core/doctype/communication/communication.py bugfix email_addr --- core/doctype/communication/communication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/doctype/communication/communication.py b/core/doctype/communication/communication.py index a78eb4cbd8..75599afe39 100644 --- a/core/doctype/communication/communication.py +++ b/core/doctype/communication/communication.py @@ -107,7 +107,7 @@ def set_lead_and_contact(d): d.lead = webnotes.conn.get_value("Lead", {"email_id": email_addr[1]}, "name") or None if not d.lead and not d.contact: - d.lead = make_lead(d, email_addr[0], email_id[1]) + d.lead = make_lead(d, email_addr[0], email_addr[1]) def make_lead(d, real_name, email_id): lead = webnotes.doc("Lead") From ac318c8678cdc10ce8ca262aa2f61c3600d39d77 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 10 Dec 2012 12:48:02 +0100 Subject: [PATCH 2/2] fix in get_diff due to daylight savings --- public/js/legacy/utils/datetime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/legacy/utils/datetime.js b/public/js/legacy/utils/datetime.js index c147912905..8ae6ec7ffe 100644 --- a/public/js/legacy/utils/datetime.js +++ b/public/js/legacy/utils/datetime.js @@ -69,7 +69,7 @@ wn.datetime = { get_diff: function(d1, d2) { if(typeof d1=='string') d1 = dateutil.str_to_obj(d1); if(typeof d2=='string') d2 = dateutil.str_to_obj(d2); - return ((d1-d2) / 86400000); + return Math.round((d1-d2) / 86400000); }, get_day_diff: function(d1, d2) {