Skip to content

Commit

Permalink
Made get_language_from_path also handle ValueError (35627).
Browse files Browse the repository at this point in the history
  • Loading branch information
lorinkoz committed Jul 23, 2024
1 parent cf03aa4 commit d4304db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/utils/translation/trans_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 555,7 @@ def get_language_from_path(path, strict=False):
lang_code = regex_match[1]
try:
return get_supported_language_variant(lang_code, strict=strict)
except LookupError:
except (LookupError, ValueError):
return None


Expand Down

0 comments on commit d4304db

Please sign in to comment.