Skip to content

Commit ab58220

Browse files
CyberSecDefCopilot
andauthored
Update novelforge/config.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f2d9125 commit ab58220

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

novelforge/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ def _get_percentage_env(
240240
"""Return an integer percentage env var constrained to the given range."""
241241
value = get_env_int(name, default, min_value=min_value)
242242
if value > max_value:
243-
raise ValueError(
243+
_CONFIG_PARSE_ERRORS.append(
244244
f"{name} must be <= {max_value} (got {value})."
245245
)
246+
return default
246247
return value
247248

248249

0 commit comments

Comments
 (0)