fix: Clear report cache for all users

Co-Authored-By: Shrihari Mahabal <shriharimahabal08@gmail.com>
This commit is contained in:
Ankush Menat 2026-03-25 16:46:53 +05:30
parent fd4245fc56
commit 6572760990

View file

@ -111,14 +111,7 @@ class Report(Document):
return super().clear_cache()
def update_report_cache(self):
from frappe.boot import get_allowed_reports
fresh_reports = get_allowed_reports()
bootinfo = frappe.cache.hget("bootinfo", frappe.session.user)
if bootinfo and bootinfo.get("user"):
bootinfo["user"]["all_reports"] = fresh_reports
frappe.cache.hset("bootinfo", frappe.session.user, bootinfo)
frappe.cache.delete_key("bootinfo")
def delete_report_folder(self):
from frappe.modules.export_file import delete_folder