From 1bd244c6fc3fe6da874ea37272e46e4ec6a0a767 Mon Sep 17 00:00:00 2001 From: Ali <010109ali@gmail.com> Date: Mon, 22 Jun 2026 16:22:19 +0000 Subject: [PATCH] fix: bust the correct frappe.local block caches after save The permission-hook refactor in jey_theme dropped the _jey_layout_raw cache slot and added _jey_blocked_doctypes/_workspaces/_slugs. _bust_caches now clears those so a save / block toggle is reflected within the same request. Co-Authored-By: Claude Opus 4.8 --- jey_layout/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jey_layout/api.py b/jey_layout/api.py index b0b5a4c..3ae4cf3 100644 --- a/jey_layout/api.py +++ b/jey_layout/api.py @@ -280,7 +280,7 @@ def reset_to_default(): def _bust_caches(): - for attr in (desk_layout._CACHE_ATTR, "_jey_layout_raw"): + for attr in (desk_layout._CACHE_ATTR, "_jey_blocked_doctypes", "_jey_blocked_workspaces", "_jey_blocked_slugs"): if hasattr(frappe.local, attr): delattr(frappe.local, attr)