From 79165905288a11f09fbef8659f5d6e7f9a472ad3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 24 May 2017 17:31:58 +0530 Subject: [PATCH] Revert "Update lead.py (#8789)" This reverts commit 9283377f87b891563b844620a2fe4f9823e7e3f1. --- erpnext/crm/doctype/lead/lead.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index aafc128e91..ccbb5369aa 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import frappe from frappe import _ -from frappe.utils import (cstr, validate_email_add, cint, comma_and, has_gravatar, now, getdate, nowdate) +from frappe.utils import (cstr, validate_email_add, cint, comma_and, has_gravatar, now) from frappe.model.mapper import get_mapped_doc from erpnext.controllers.selling_controller import SellingController @@ -46,7 +46,7 @@ class Lead(SellingController): if self.is_new() or not self.image: self.image = has_gravatar(self.email_id) - if self.contact_date and getdate(self.contact_date) < getdate(nowdate()): + if self.contact_date and self.contact_date < now(): frappe.throw(_("Next Contact Date cannot be in the past")) def on_update(self):