mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-03-01 15:52:43 +00:00
fix: safe_value_dict on a non-iterable object
This commit is contained in:
@@ -144,7 +144,7 @@ def safe_value_nested(obj: DictMap, keys: str, default_value=None):
|
||||
"""
|
||||
nested_obj = obj
|
||||
for key in keys.split("."):
|
||||
if key in nested_obj and nested_obj[key] is not None:
|
||||
if isinstance(nested_obj, Mapping) and key in nested_obj and nested_obj[key] is not None:
|
||||
nested_obj = nested_obj[key]
|
||||
else:
|
||||
return default_value
|
||||
|
||||
Reference in New Issue
Block a user