From 2f4f8b3e36ff27f737a32324c26906b036ee886f Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 11:14:08 +0000 Subject: [PATCH] fix: use **kwargs in calendar admin handlers (slug popped by preprocessor) Co-Authored-By: Claude Opus 4.6 --- bp/calendar/admin/routes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bp/calendar/admin/routes.py b/bp/calendar/admin/routes.py index 7f4cf10..cc3ae24 100644 --- a/bp/calendar/admin/routes.py +++ b/bp/calendar/admin/routes.py @@ -16,7 +16,7 @@ def register(): # ---------- Pages ---------- @bp.get("/") @require_admin - async def admin(slug: str, calendar_slug: str): + async def admin(calendar_slug: str, **kwargs): from suma_browser.app.utils.htmx import is_htmx_request # Determine which template to use based on request type @@ -32,7 +32,7 @@ def register(): @bp.get("/description/") @require_admin - async def calendar_description_edit(slug: str, calendar_slug: str): + async def calendar_description_edit(calendar_slug: str, **kwargs): # g.post and g.calendar should already be set by the parent calendar bp html = await render_template( "_types/calendar/admin/_description_edit.html", @@ -45,7 +45,7 @@ def register(): @bp.post("/description/") @require_admin @clear_cache(tag="calendars", tag_scope="all") - async def calendar_description_save(slug: str, calendar_slug: str): + async def calendar_description_save(calendar_slug: str, **kwargs): form = await request.form description = (form.get("description") or "").strip() or None @@ -64,7 +64,7 @@ def register(): @bp.get("/description/view/") @require_admin - async def calendar_description_view(slug: str, calendar_slug: str): + async def calendar_description_view(calendar_slug: str, **kwargs): # just render the display version without touching the DB (used by Cancel) html = await render_template( "_types/calendar/admin/_description.html",