mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-15 20:31:43 +00:00
fix: improve error-handling for odd configurations
This commit is contained in:
@@ -150,7 +150,9 @@ class StrategyResolver(IResolver):
|
|||||||
# Ensure necessary migrations are performed first.
|
# Ensure necessary migrations are performed first.
|
||||||
validate_migrated_strategy_settings(strategy.config)
|
validate_migrated_strategy_settings(strategy.config)
|
||||||
|
|
||||||
if not all(k in strategy.order_types for k in REQUIRED_ORDERTYPES):
|
if not strategy.order_types or not all(
|
||||||
|
k in strategy.order_types for k in REQUIRED_ORDERTYPES
|
||||||
|
):
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
f"Impossible to load Strategy '{strategy.__class__.__name__}'. "
|
f"Impossible to load Strategy '{strategy.__class__.__name__}'. "
|
||||||
f"Order-types mapping is incomplete."
|
f"Order-types mapping is incomplete."
|
||||||
|
|||||||
Reference in New Issue
Block a user