fix: ignore DOCTYPES_FOR_DOCTYPE in issingle check (#21375)
This commit is contained in:
parent
3f3ee12338
commit
8155371162
1 changed files with 6 additions and 4 deletions
|
|
@ -136,8 +136,10 @@ def is_virtual_doctype(doctype: str):
|
|||
|
||||
|
||||
@site_cache()
|
||||
def is_single_doctype(doctype: str):
|
||||
try:
|
||||
return frappe.db.get_value("DocType", doctype, "issingle")
|
||||
except Exception:
|
||||
def is_single_doctype(doctype: str) -> bool:
|
||||
from frappe.model.base_document import DOCTYPES_FOR_DOCTYPE
|
||||
|
||||
if doctype in DOCTYPES_FOR_DOCTYPE:
|
||||
return False
|
||||
|
||||
return frappe.db.get_value("DocType", doctype, "issingle")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue