From ca07fc8376cfeec6540c560de06a20889a3e59ea Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 4 May 2016 16:05:38 +0530 Subject: [PATCH] [fix] email_alert.py --- frappe/email/doctype/email_alert/email_alert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/doctype/email_alert/email_alert.py b/frappe/email/doctype/email_alert/email_alert.py index e8c38c83dd..1233fb90e8 100644 --- a/frappe/email/doctype/email_alert/email_alert.py +++ b/frappe/email/doctype/email_alert/email_alert.py @@ -51,7 +51,7 @@ def trigger_email_alerts(doc, method=None): diff_days = -diff_days for name in frappe.db.sql_list("""select name from `tab{0}` where - DATE({1}) = ADDDATE(DATE(%s), INTERVAL %s DAY)""".format(alert.document_type, alert.date_changed), + DATE(`{1}`) = ADDDATE(DATE(%s), INTERVAL %s DAY)""".format(alert.document_type, alert.date_changed), (nowdate(), diff_days or 0)): evaluate_alert(frappe.get_doc(alert.document_type, name),