fix: Dont use meta for get_controller
This commit is contained in:
parent
11f7e41994
commit
95ad5c7696
1 changed files with 5 additions and 5 deletions
|
|
@ -59,11 +59,11 @@ def import_controller(doctype):
|
|||
|
||||
module_name = "Core"
|
||||
if doctype not in DOCTYPES_FOR_DOCTYPE:
|
||||
meta = frappe.get_meta(doctype, cached=not frappe.flags.in_migrate)
|
||||
if meta.custom:
|
||||
return NestedSet if meta.get("is_tree") else Document
|
||||
|
||||
module_name = meta.module
|
||||
doctype_info = frappe.db.get_value("DocType", doctype, fieldname="*")
|
||||
if doctype_info:
|
||||
if doctype_info.custom:
|
||||
return NestedSet if doctype_info.is_tree else Document
|
||||
module_name = doctype_info.module
|
||||
|
||||
module_path = None
|
||||
class_overrides = frappe.get_hooks("override_doctype_class")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue