parent
2b95a5438b
commit
65b3356dee
@ -13,7 +13,12 @@ def execute():
|
|||||||
for domain in all_domains:
|
for domain in all_domains:
|
||||||
translated_domain = _(domain, lang=language)
|
translated_domain = _(domain, lang=language)
|
||||||
if frappe.db.exists("Domain", translated_domain):
|
if frappe.db.exists("Domain", translated_domain):
|
||||||
frappe.rename_doc("Domain", translated_domain, domain, ignore_permissions=True, merge=True)
|
#if domain already exists merged translated_domain and domain
|
||||||
|
merge = False
|
||||||
|
if frappe.db.exists("Domain", domain):
|
||||||
|
merge=True
|
||||||
|
|
||||||
|
frappe.rename_doc("Domain", translated_domain, domain, ignore_permissions=True, merge=merge)
|
||||||
|
|
||||||
domain_settings = frappe.get_single("Domain Settings")
|
domain_settings = frappe.get_single("Domain Settings")
|
||||||
active_domains = [d.domain for d in domain_settings.active_domains]
|
active_domains = [d.domain for d in domain_settings.active_domains]
|
||||||
|
Loading…
Reference in New Issue
Block a user