From f18721a0f8a24e00491c1742f483d08b6e657d13 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Thu, 9 Mar 2017 15:24:50 +0530 Subject: [PATCH] [Fix] Updating the child doc --- frappe/email/doctype/email_queue/email_queue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/email/doctype/email_queue/email_queue.py b/frappe/email/doctype/email_queue/email_queue.py index edccabc174..edbf6879c8 100644 --- a/frappe/email/doctype/email_queue/email_queue.py +++ b/frappe/email/doctype/email_queue/email_queue.py @@ -37,11 +37,11 @@ def retry_sending(name): doc = frappe.get_doc("Email Queue", name) if doc and (doc.status == "Error" or doc.status == "Partially Errored"): doc.status = "Not Sent" + for d in doc.recipients: + if d.status != 'Sent': + d.status = 'Not Sent' doc.save(ignore_permissions=True) - frappe.db.sql("""update `tabEmail Queue Recipient` set status='Not Sent', modified=%s where parent=%s""", - (now_datetime(), name)) - @frappe.whitelist() def send_now(name): send_one(name, now=True)