fix(qa): ISSUE-001 — SKU prices 404 for SKUs containing slashes

SKUs with forward slashes (e.g. 0V2071/250159/250158) caused a 404
on /api/mappings/{sku}/prices because path separators in the SKU
were interpreted as URL path segments. Changed to query parameter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-03-27 13:16:20 +00:00
parent 5a5ca63f92
commit 7e4bbabcae
3 changed files with 4 additions and 4 deletions

View File

@@ -146,8 +146,8 @@ async def create_batch_mapping(data: MappingBatchCreate):
return {"success": False, "error": str(e)}
@router.get("/api/mappings/{sku}/prices")
async def get_mapping_prices(sku: str):
@router.get("/api/mappings/prices")
async def get_mapping_prices(sku: str = Query(...)):
"""Get component prices from crm_politici_pret_art for a kit SKU."""
app_settings = await sqlite_service.get_app_settings()
id_pol = int(app_settings.get("id_pol") or 0) or None