Merge pull request #4058 from pratu16x7/setup-fixes

[setup] suppress post-setup messages
This commit is contained in:
Rushabh Mehta 2017-09-05 12:20:50 +05:30 committed by GitHub
commit 46eee356ff
2 changed files with 4 additions and 2 deletions

View file

@ -112,7 +112,9 @@ class User(Document):
self.get("roles")]):
return
if self.name not in STANDARD_USERS and self.user_type == "System User" and not self.get_other_system_managers():
if (self.name not in STANDARD_USERS and self.user_type == "System User" and not self.get_other_system_managers()
and cint(frappe.db.get_single_value('System Settings', 'setup_complete'))):
msgprint(_("Adding System Manager to this User as there must be atleast one System Manager"))
self.append("roles", {
"doctype": "Has Role",

View file

@ -53,7 +53,7 @@ def get_outgoing_email_account(raise_exception_not_set=True, append_to=None):
if not email_account:
email_account = get_default_outgoing_email_account(raise_exception_not_set=raise_exception_not_set)
if not email_account and raise_exception_not_set:
if not email_account and raise_exception_not_set and cint(frappe.db.get_single_value('System Settings', 'setup_complete')):
frappe.throw(_("Please setup default Email Account from Setup > Email > Email Account"),
frappe.OutgoingEmailError)