Update on previous commit: calls on_update method of email_digest obj for creating a scheduler entry

This commit is contained in:
Anand Doshi 2011-12-22 12:26:36 +05:30
parent 972b165850
commit 248f8f5687

View File

@ -24,6 +24,7 @@ def enabled_default_email_digest():
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 @@ def enabled_default_email_digest():
if edigest:
edigest.enabled = 1
edigest.save()
ed_obj = get_obj(doc=edigest)
ed_obj.on_update()
def create_default_email_digest():