From 73792fd6ce81f004dfa0fbe3129f86a6e9e2c697 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 21 Dec 2022 06:28:55 +0100 Subject: [PATCH] Don't attempt to convert None to dict --- freqtrade/rpc/api_server/api_backtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/rpc/api_server/api_backtest.py b/freqtrade/rpc/api_server/api_backtest.py index 4e43a63b1..bc2a40d91 100644 --- a/freqtrade/rpc/api_server/api_backtest.py +++ b/freqtrade/rpc/api_server/api_backtest.py @@ -38,7 +38,7 @@ async def api_start_backtest(bt_settings: BacktestRequest, background_tasks: Bac btconfig = deepcopy(config) settings = dict(bt_settings) - if 'freqai' in settings: + if settings.get('freqai', None) is not None: settings['freqai'] = dict(settings['freqai']) # Pydantic models will contain all keys, but non-provided ones are None