mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-08 04:22:20 +08:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user