parsers.py
: Allow lowercase COURSE names
This commit is contained in:
parent
7b7dd15a62
commit
768f05d539
@ -101,6 +101,7 @@ def split_tja_lines_into_courses(lines: List[str]) -> TJASong:
|
||||
|
||||
# Course-specific metadata fields
|
||||
if name_upper == 'COURSE':
|
||||
value = value.lower().capitalize() # coerce hard/HARD -> Hard
|
||||
if value not in NORMALIZE_COURSE:
|
||||
raise ValueError(f"Invalid COURSE value: '{value}'")
|
||||
current_course = NORMALIZE_COURSE[value]
|
||||
|
Loading…
Reference in New Issue
Block a user