Update on previous commit: calls on_update method of email_digest obj for creating a scheduler entry
diff --git a/erpnext/patches/deploy_email_digest.py b/erpnext/patches/deploy_email_digest.py
index ff60f57..02f842c 100644
--- a/erpnext/patches/deploy_email_digest.py
+++ b/erpnext/patches/deploy_email_digest.py
@@ -24,6 +24,7 @@
Enables the created email digest
"""
from webnotes.model.doc import Document
+ from webnotes.model.code import get_obj
companies_list = webnotes.conn.sql("SELECT company_name FROM `tabCompany`", as_list=1)
for company in companies_list:
if company and company[0]:
@@ -31,6 +32,9 @@
if edigest:
edigest.enabled = 1
edigest.save()
+ ed_obj = get_obj(doc=edigest)
+ ed_obj.on_update()
+
def create_default_email_digest():