Fix: type check in resume parsing method (#13740)

### What problem does this PR solve?

Fix: type check in resume parsing method
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Magicbook1108
2026-03-23 21:19:09 +08:00
committed by GitHub
parent df2cc32f51
commit f991cd362e

View File

@@ -163,9 +163,11 @@ FIELD_MAP_EN = {
}
def _is_english(lang: str) -> bool:
"""Determine if the language parameter indicates English"""
return lang.lower() in ("english", "en")
def _is_english(lang: str | None) -> bool:
"""Determine if the language parameter indicates English."""
if not isinstance(lang, str):
return False
return lang.strip().lower() in ("english", "en")
def get_field_map(lang: str) -> dict: