Revert "perf: cache docstatus check for invalid links" (#32799)

This reverts commit be5c96acf22f208c4ec8fbcde92a721b0e84d561.
This commit is contained in:
Ankush Menat 2025-06-05 14:22:57 +05:30 committed by GitHub
parent ccfb5a01eb
commit a3d5b4af77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -926,9 +926,7 @@ class BaseDocument:
df.fieldname != "amended_from"
and (is_submittable or self.meta.is_submittable)
and frappe.get_meta(doctype).is_submittable
and DocStatus(
frappe.db.get_value(doctype, docname, "docstatus", cache=True) or 0
).is_cancelled()
and DocStatus(frappe.db.get_value(doctype, docname, "docstatus") or 0).is_cancelled()
):
cancelled_links.append((df.fieldname, docname, get_msg(df, docname)))