diff --git a/erpnext/patches/v9_2/rename_translated_domains_in_en.py b/erpnext/patches/v9_2/rename_translated_domains_in_en.py index 168605d9a5..c787b84239 100644 --- a/erpnext/patches/v9_2/rename_translated_domains_in_en.py +++ b/erpnext/patches/v9_2/rename_translated_domains_in_en.py @@ -13,7 +13,12 @@ def execute(): for domain in all_domains: translated_domain = _(domain, lang=language) 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") active_domains = [d.domain for d in domain_settings.active_domains]