From 41b711c17ef89f2489149a78c938b7c1af21f14a Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Tue, 24 Mar 2026 13:31:52 -0400 Subject: [PATCH] fix: normalize deck report slug matching (spaces/hyphens/underscores) --- coach/coach_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coach/coach_service.py b/coach/coach_service.py index d06d842..f2bf4fa 100644 --- a/coach/coach_service.py +++ b/coach/coach_service.py @@ -10,6 +10,7 @@ import json import logging import uuid import os +import re from datetime import datetime, timezone from pathlib import Path from typing import Optional, List, Dict @@ -57,7 +58,7 @@ class CoachService: if not report_path.exists(): # Try case-insensitive match for f in DECK_REPORTS_DIR.glob("*.json"): - if f.stem.lower() == deck_id.lower(): + if re.sub(r'[^a-z0-9]', '', f.stem.lower()) == re.sub(r'[^a-z0-9]', '', deck_id.lower()): report_path = f break