fix: skip overriden doctypes during orphan check (#23518)
These are prone to breakage and shouldn't be deleted automatically. This mostly works fine but there can be cases where it doesn't. So best to leave them untouched.
This commit is contained in:
parent
286e0a7b96
commit
ebbd3cd137
1 changed files with 3 additions and 0 deletions
|
|
@ -153,8 +153,11 @@ def remove_orphan_doctypes():
|
|||
orphan_doctypes = []
|
||||
|
||||
clear_controller_cache()
|
||||
class_overrides = frappe.get_hooks("override_doctype_class", {})
|
||||
|
||||
for doctype in doctype_names:
|
||||
if doctype in class_overrides:
|
||||
continue
|
||||
try:
|
||||
get_controller(doctype=doctype)
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue