From 73f00d2bc3f1faabefc2b3e1fd86fa0363bd250e Mon Sep 17 00:00:00 2001 From: Meng Xiangzhuo Date: Tue, 3 Dec 2024 00:31:34 +0800 Subject: [PATCH] fix: check if days is None before conversion --- freqtrade/data/history/history_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index 0dabcdf3b..eb93f3ad5 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -604,7 +604,7 @@ def download_data( Download data function. Used from both cli and API. """ timerange = TimeRange() - if "days" in config: + if "days" in config and config["days"] is not None: time_since = (datetime.now() - timedelta(days=config["days"])).strftime("%Y%m%d") timerange = TimeRange.parse_timerange(f"{time_since}-")