Restore menu_items fallback for nav, update shared submodule
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s

Keep get_navigation_tree() as fallback when nav-tree fragment fetch
fails. Update shared submodule with fixed app slug URLs in nav.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-24 11:57:54 +00:00
parent 2145332cb6
commit 254c8a6424
2 changed files with 4 additions and 1 deletions

3
app.py
View File

@@ -14,6 +14,7 @@ from bp import register_account_bp, register_auth_bp, register_fragments
async def account_context() -> dict: async def account_context() -> dict:
"""Account app context processor.""" """Account app context processor."""
from shared.infrastructure.context import base_context from shared.infrastructure.context import base_context
from shared.services.navigation import get_navigation_tree
from shared.infrastructure.cart_identity import current_cart_identity from shared.infrastructure.cart_identity import current_cart_identity
from shared.infrastructure.fragments import fetch_fragment from shared.infrastructure.fragments import fetch_fragment
@@ -23,6 +24,8 @@ async def account_context() -> dict:
"blog", "nav-tree", "blog", "nav-tree",
params={"app_name": "account", "path": request.path}, params={"app_name": "account", "path": request.path},
) )
# Fallback for _nav.html when nav-tree fragment fetch fails
ctx["menu_items"] = await get_navigation_tree(g.s)
# Cart data (consistent with all other apps) # Cart data (consistent with all other apps)
ident = current_cart_identity() ident = current_cart_identity()

2
shared

Submodule shared updated: 7e650a0ee3...ab674ada31