瀏覽代碼

[minor] delete comment from documents _comments column on communication on_trash event

version-14
mbauskar 7 年之前
父節點
當前提交
4b8aa83e61
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      frappe/core/doctype/communication/communication.py

+ 3
- 1
frappe/core/doctype/communication/communication.py 查看文件

@@ -7,7 +7,7 @@ from frappe import _
from frappe.model.document import Document
from frappe.utils import validate_email_add, get_fullname, strip_html, cstr
from frappe.core.doctype.communication.comment import (notify_mentions,
update_comment_in_doc)
update_comment_in_doc, on_trash)
from frappe.core.doctype.communication.email import (validate_email,
notify, _notify, update_parent_status)
from frappe.utils.bot import BotReply
@@ -111,6 +111,8 @@ class Communication(Document):
frappe.publish_realtime('delete_communication', self.as_dict(),
doctype= self.reference_doctype, docname = self.reference_name,
after_commit=True)
# delete the comments from _comment
on_trash(self)

def set_status(self):
if not self.is_new():


Loading…
取消
儲存