fix: consider Not Sent and Sending status while pulling daily e… (#9496)

Co-authored-by: Saurabh <saurabh6790@gmail.com>
This commit is contained in:
sahil28297 2020-02-18 15:43:16 +05:30 committed by GitHub
parent 14fef7d01e
commit b1d42e1302
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -256,7 +256,7 @@ def get_emails_sent_this_month():
def get_emails_sent_today():
return frappe.db.sql("""SELECT COUNT(`name`) FROM `tabEmail Queue` WHERE
`status`='Sent' AND `creation` > (NOW() - INTERVAL '24' HOUR)""")[0][0]
`status` in ('Sent', 'Not Sent', 'Sending') AND `creation` > (NOW() - INTERVAL '24' HOUR)""")[0][0]
def get_unsubscribe_message(unsubscribe_message, expose_recipients):
if unsubscribe_message: