Migrate callers from attach-child/detach-child to relate/unrelate API

Switch all cross-service relation calls to the new registry-aware
relate/unrelate/can-relate actions, and consolidate per-service
container-nav fragment fetches into the generic relations handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 09:24:52 +00:00
parent 53c4a0a1e0
commit d2f1da4944
9 changed files with 65 additions and 70 deletions

View File

@@ -47,6 +47,7 @@ def register():
container_type = request.args.get("container_type", "page")
container_id = int(request.args.get("container_id", 0))
post_slug = request.args.get("post_slug", "")
nav_class = request.args.get("nav_class", "")
exclude_raw = request.args.get("exclude", "")
exclude = set(exclude_raw.split(",")) if exclude_raw else set()
@@ -76,7 +77,7 @@ def register():
name=child.label or "",
icon=defn.nav_icon or "",
**{
"nav-class": "",
"nav-class": nav_class,
"relation-type": defn.name,
},
))