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:
@@ -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,
|
||||
},
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user