fix: use **kwargs in calendar admin handlers (slug popped by preprocessor)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 37s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ def register():
|
|||||||
# ---------- Pages ----------
|
# ---------- Pages ----------
|
||||||
@bp.get("/")
|
@bp.get("/")
|
||||||
@require_admin
|
@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
|
from suma_browser.app.utils.htmx import is_htmx_request
|
||||||
|
|
||||||
# Determine which template to use based on request type
|
# Determine which template to use based on request type
|
||||||
@@ -32,7 +32,7 @@ def register():
|
|||||||
|
|
||||||
@bp.get("/description/")
|
@bp.get("/description/")
|
||||||
@require_admin
|
@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
|
# g.post and g.calendar should already be set by the parent calendar bp
|
||||||
html = await render_template(
|
html = await render_template(
|
||||||
"_types/calendar/admin/_description_edit.html",
|
"_types/calendar/admin/_description_edit.html",
|
||||||
@@ -45,7 +45,7 @@ def register():
|
|||||||
@bp.post("/description/")
|
@bp.post("/description/")
|
||||||
@require_admin
|
@require_admin
|
||||||
@clear_cache(tag="calendars", tag_scope="all")
|
@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
|
form = await request.form
|
||||||
description = (form.get("description") or "").strip() or None
|
description = (form.get("description") or "").strip() or None
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ def register():
|
|||||||
|
|
||||||
@bp.get("/description/view/")
|
@bp.get("/description/view/")
|
||||||
@require_admin
|
@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)
|
# just render the display version without touching the DB (used by Cancel)
|
||||||
html = await render_template(
|
html = await render_template(
|
||||||
"_types/calendar/admin/_description.html",
|
"_types/calendar/admin/_description.html",
|
||||||
|
|||||||
Reference in New Issue
Block a user