From cef8f4d4503cec44b9a73a0acfb95348c71fc8b7 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Mon, 21 Oct 2019 21:00:13 +0530 Subject: [PATCH] Update unhandled_email.py --- frappe/email/doctype/unhandled_email/unhandled_email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/doctype/unhandled_email/unhandled_email.py b/frappe/email/doctype/unhandled_email/unhandled_email.py index 99971c658d..9f9357c1f2 100644 --- a/frappe/email/doctype/unhandled_email/unhandled_email.py +++ b/frappe/email/doctype/unhandled_email/unhandled_email.py @@ -11,4 +11,4 @@ class UnhandledEmail(Document): def remove_old_unhandled_emails(): - frappe.db.sql("""DELETE FROM `tabUnhandled Email` WHERE datediff(curdate(), date(creation)) > 30""") + frappe.db.sql("""DELETE FROM `tabUnhandled Email` WHERE DATEDIFF(CURRENT_DATE(), DATE(creation)) > 30""")