fix: setup wizard
This commit is contained in:
parent
89f2138fbc
commit
b1350af1f6
@ -45,9 +45,16 @@ def enable_shopping_cart(args):
|
||||
def create_email_digest():
|
||||
from frappe.utils.user import get_system_managers
|
||||
system_managers = get_system_managers(only_name=True)
|
||||
|
||||
if not system_managers:
|
||||
return
|
||||
|
||||
recipients = []
|
||||
for d in system_managers:
|
||||
recipients.append({
|
||||
'recipient': d
|
||||
})
|
||||
|
||||
companies = frappe.db.sql_list("select name FROM `tabCompany`")
|
||||
for company in companies:
|
||||
if not frappe.db.exists("Email Digest", "Default Weekly Digest - " + company):
|
||||
@ -56,7 +63,7 @@ def create_email_digest():
|
||||
"name": "Default Weekly Digest - " + company,
|
||||
"company": company,
|
||||
"frequency": "Weekly",
|
||||
"recipient_list": "\n".join(system_managers)
|
||||
"recipients": recipients
|
||||
})
|
||||
|
||||
for df in edigest.meta.get("fields", {"fieldtype": "Check"}):
|
||||
@ -72,7 +79,7 @@ def create_email_digest():
|
||||
"name": "Scheduler Errors",
|
||||
"company": companies[0],
|
||||
"frequency": "Daily",
|
||||
"recipient_list": "\n".join(system_managers),
|
||||
"recipients": recipients,
|
||||
"scheduler_errors": 1,
|
||||
"enabled": 1
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user