fix: respect target page restrictions during body section navigation

This commit is contained in:
2026-10-17 20:21:18 +08:00
parent 9a1afd5020
commit d27ad535c6
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -97,6 +97,8 @@ def _body_navigator(db, *, course_version_id, project_id, category):
return None
def navigate(target):
if "body" not in target.get("allowed_page_types", ["body"]):
return []
label = normalize_heading(target.get("label") or "")
if not label:
return []