[fix] do not translate domain records
This commit is contained in:
parent
d5fc56cc36
commit
d61b92dc1f
2 changed files with 7 additions and 6 deletions
|
|
@ -34,11 +34,13 @@ class Domain(Document):
|
|||
def remove_domain(self):
|
||||
'''Unset domain settings'''
|
||||
self.setup_data()
|
||||
for role_name in self.data.restricted_roles:
|
||||
if frappe.db.exists('Role', role_name):
|
||||
role = frappe.get_doc('Role', role_name)
|
||||
role.disabled = 1
|
||||
role.save()
|
||||
|
||||
if self.data.restricted_roles:
|
||||
for role_name in self.data.restricted_roles:
|
||||
if frappe.db.exists('Role', role_name):
|
||||
role = frappe.get_doc('Role', role_name)
|
||||
role.disabled = 1
|
||||
role.save()
|
||||
|
||||
if self.data.custom_fields:
|
||||
for doctype in self.data.custom_fields:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class DomainSettings(Document):
|
|||
frappe.set_value('Role', role, 'disabled', 1)
|
||||
|
||||
for domain in all_domains:
|
||||
domain = _(domain)
|
||||
data = frappe.get_domain_data(domain)
|
||||
if not frappe.db.get_value('Domain', domain):
|
||||
frappe.get_doc(dict(doctype='Domain', domain=domain)).insert()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue