Merge pull request #12427 from rohitwaghchaure/ignore-notify-update-in-patch

perf: Ignore notify update in patch execution
This commit is contained in:
mergify[bot] 2021-02-18 09:13:27 +00:00 committed by GitHub
commit db88902a70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1015,6 +1015,8 @@ class Document(BaseDocument):
def notify_update(self):
"""Publish realtime that the current document is modified"""
if frappe.flags.in_patch: return
frappe.publish_realtime("doc_update", {"modified": self.modified, "doctype": self.doctype, "name": self.name},
doctype=self.doctype, docname=self.name, after_commit=True)