Update unhandled_email.py
This commit is contained in:
parent
cef8f4d450
commit
5b6b10fc27
1 changed files with 2 additions and 1 deletions
|
|
@ -11,4 +11,5 @@ class UnhandledEmail(Document):
|
|||
|
||||
|
||||
def remove_old_unhandled_emails():
|
||||
frappe.db.sql("""DELETE FROM `tabUnhandled Email` WHERE DATEDIFF(CURRENT_DATE(), DATE(creation)) > 30""")
|
||||
frappe.db.sql("""DELETE FROM `tabUnhandled Email`
|
||||
WHERE creation < %s""", frappe.utils.add_days(frappe.utils.nowdate(), -30))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue