From 9e8efb26c2a364700b4c35af7bf0317d9e7cb3fc Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Mon, 11 May 2026 00:00:43 +0500 Subject: [PATCH] Fix main section lock (#10837) * Fix main section lock Signed-off-by: Denis Bykhov * Fix formatting Signed-off-by: Denis Bykhov --------- Signed-off-by: Denis Bykhov --- .../src/components/MasterTagAttributes.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/card-resources/src/components/MasterTagAttributes.svelte b/plugins/card-resources/src/components/MasterTagAttributes.svelte index 61142779b6..e8826859f2 100644 --- a/plugins/card-resources/src/components/MasterTagAttributes.svelte +++ b/plugins/card-resources/src/components/MasterTagAttributes.svelte @@ -63,7 +63,12 @@ async function toggleLock (ev: MouseEvent): Promise { ev.stopPropagation() const op = isLocked ? '$pull' : '$push' - await client.update(value, { [op]: { readonlySections: value._class } }) + const targets = isLocked + ? hierarchy.getAncestors(value._class).filter((p) => value.readonlySections?.includes(p)) + : [value._class] + for (const target of targets) { + await client.update(value, { [op]: { readonlySections: target } }) + } }