diff --git a/bp/product/routes.py b/bp/product/routes.py index 9a51042..7eae4c6 100644 --- a/bp/product/routes.py +++ b/bp/product/routes.py @@ -159,7 +159,8 @@ def register(): @bp.post("/cart/") @clear_cache(tag="browse", tag_scope="user") - async def cart(slug: str): + async def cart(**_kw): + slug = g.product_slug # make sure product exists (we *allow* deleted_at != None later if you want) product_id = await g.s.scalar( select(Product.id).where(