Explorar el Código

[setup] suppress post-setup messages

version-14
pratu16x7 hace 7 años
padre
commit
276f5b5631
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. +3
    -1
      frappe/core/doctype/user/user.py
  2. +1
    -1
      frappe/email/smtp.py

+ 3
- 1
frappe/core/doctype/user/user.py Ver fichero

@@ -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",


+ 1
- 1
frappe/email/smtp.py Ver fichero

@@ -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)



Cargando…
Cancelar
Guardar