Reload Domain in patch
This commit is contained in:
parent
de6fc02509
commit
d37875a091
1 changed files with 6 additions and 4 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("core", "doctype", "domain")
|
||||
frappe.reload_doc("core", "doctype", "has_domain")
|
||||
active_domains = frappe.get_active_domains()
|
||||
all_domains = (frappe.get_hooks('domains') or {}).keys()
|
||||
all_domains = frappe.get_all("Domain")
|
||||
|
||||
for domain in all_domains:
|
||||
if domain not in active_domains:
|
||||
inactive_domain = frappe.get_doc("Domain", domain)
|
||||
for d in all_domains:
|
||||
if d.name not in active_domains:
|
||||
inactive_domain = frappe.get_doc("Domain", d.name)
|
||||
inactive_domain.setup_data()
|
||||
inactive_domain.remove_custom_field()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue