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 <noreply@anthropic.com>
This commit is contained in:
Ali 2026-06-22 16:22:19 +00:00
parent 721273a2f7
commit 1bd244c6fc
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ def reset_to_default():
def _bust_caches(): 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): if hasattr(frappe.local, attr):
delattr(frappe.local, attr) delattr(frappe.local, attr)