Move download all setting to config.py

This commit is contained in:
Jan Bader
2026-04-12 22:37:35 +02:00
parent 038d239033
commit 0eee28968f
3 changed files with 3 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
import html
import logging
import os
import re
import time
from pathlib import Path
@@ -370,7 +369,7 @@ def download_all_invoices() -> list[Path]:
years = get_year_options(page)
if not years:
raise RuntimeError("No years found on billing page.")
download_all_years = os.getenv("DOWNLOAD_ALL_YEARS", "").lower() in ("1", "true", "yes", "y")
download_all_years = Config.DOWNLOAD_ALL_YEARS
if not download_all_years:
years = [years[0]]
logger.info("Group '%s' - years: %s", group["label"], years)