[fix] set default language in local
This commit is contained in:
parent
1e74519726
commit
11ec2c50e0
@ -4,7 +4,9 @@ from frappe import _
|
||||
def execute():
|
||||
language = frappe.get_single("System Settings").language
|
||||
|
||||
if language.startswith('en'): return
|
||||
if language and language.startswith('en'): return
|
||||
|
||||
frappe.local.lang = language
|
||||
|
||||
all_domains = frappe.get_hooks("domains")
|
||||
|
||||
@ -16,6 +18,7 @@ def execute():
|
||||
domain_settings = frappe.get_single("Domain Settings")
|
||||
active_domains = [d.domain for d in domain_settings.active_domains]
|
||||
|
||||
try:
|
||||
for domain in active_domains:
|
||||
domain = frappe.get_doc("Domain", domain)
|
||||
domain.setup_domain()
|
||||
@ -24,3 +27,5 @@ def execute():
|
||||
domain.setup_sidebar_items()
|
||||
domain.setup_desktop_icons()
|
||||
domain.set_default_portal_role()
|
||||
except frappe.LinkValidationError:
|
||||
pass
|
Loading…
Reference in New Issue
Block a user