Skip to content

Commit e2b4a49

Browse files
author
William Yang
committed
fix: convert 3-part slug to 2-part for API calls
1 parent 4e5a0f4 commit e2b4a49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bootcs/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,13 @@ def find_check_dir(slug, language: str = "c", force_update: bool = False):
385385
return path
386386

387387
# 2. Try remote download (if slug has course/stage format)
388-
if course_slug and "/" in slug:
388+
if course_slug:
389389
try:
390390
from .api.checks import get_checks_manager
391391
manager = get_checks_manager()
392-
check_path = manager.get_checks(slug, language=language, force_update=force_update)
392+
# API expects 2-part slug (course/stage), convert if needed
393+
api_slug = f"{course_slug}/{stage_name}"
394+
check_path = manager.get_checks(api_slug, language=language, force_update=force_update)
393395
if check_path.exists():
394396
return check_path
395397
except Exception as e:

0 commit comments

Comments
 (0)