瀏覽代碼

[Fix] Updating the child doc

version-14
Manas Solanki 8 年之前
父節點
當前提交
f18721a0f8
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      frappe/email/doctype/email_queue/email_queue.py

+ 3
- 3
frappe/email/doctype/email_queue/email_queue.py 查看文件

@@ -37,11 +37,11 @@ def retry_sending(name):
doc = frappe.get_doc("Email Queue", name) doc = frappe.get_doc("Email Queue", name)
if doc and (doc.status == "Error" or doc.status == "Partially Errored"): if doc and (doc.status == "Error" or doc.status == "Partially Errored"):
doc.status = "Not Sent" doc.status = "Not Sent"
for d in doc.recipients:
if d.status != 'Sent':
d.status = 'Not Sent'
doc.save(ignore_permissions=True) 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() @frappe.whitelist()
def send_now(name): def send_now(name):
send_one(name, now=True) send_one(name, now=True)


Loading…
取消
儲存