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 } }) + } }