fix: add missing db argument to get_admin_context calls

The get_admin_context function signature changed to require db as
the second argument, but many admin route handlers were still using
the old signature (request, current_user).

Updated all occurrences across modules:
- core, catalog, dev_tools, inventory, customers, messaging
- billing, tenancy, monitoring, analytics, orders, marketplace

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 19:59:45 +01:00
parent 1965e22faf
commit 01e7602dcb
12 changed files with 40 additions and 40 deletions

View File

@@ -40,7 +40,7 @@ async def admin_subscription_tiers_page(
"""
return templates.TemplateResponse(
"billing/admin/subscription-tiers.html",
get_admin_context(request, current_user),
get_admin_context(request, db, current_user),
)
@@ -58,7 +58,7 @@ async def admin_subscriptions_page(
"""
return templates.TemplateResponse(
"billing/admin/subscriptions.html",
get_admin_context(request, current_user),
get_admin_context(request, db, current_user),
)
@@ -76,5 +76,5 @@ async def admin_billing_history_page(
"""
return templates.TemplateResponse(
"billing/admin/billing-history.html",
get_admin_context(request, current_user),
get_admin_context(request, db, current_user),
)