Remove cross-DB menu_nodes query from non-blog apps
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m19s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m19s
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user