Remove cross-DB menu_nodes query from non-blog apps

menu_nodes table lives in db_blog. Non-blog apps (cart, market, events,
account, federation) were querying it on their own DB session, causing
UndefinedTableError. The nav-tree fragment from blog provides the real
navigation; menu_items is now an empty fallback list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-25 14:18:02 +00:00
parent 094b6c55cd
commit 507a5a66ff
5 changed files with 10 additions and 15 deletions

View File

@@ -18,7 +18,6 @@ from bp import (
async def federation_context() -> dict:
"""Federation app context processor."""
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.fragments import fetch_fragments
from shared.infrastructure.data_client import fetch_data
@@ -26,8 +25,8 @@ async def federation_context() -> dict:
ctx = await base_context()
# Fallback for _nav.html when nav-tree fragment fetch fails
ctx["menu_items"] = await get_navigation_tree(g.s)
# menu_nodes lives in db_blog; nav-tree fragment provides the real nav
ctx["menu_items"] = []
# Cart data via internal data endpoint
ident = current_cart_identity()