chore: ensure empty leverage tiers files don't cause an exception

This commit is contained in:
Matthias
2024-10-20 15:22:50 +02:00
parent 0a5549ebc9
commit 51dd7fa58e

View File

@@ -3189,7 +3189,7 @@ class Exchange:
if updated_dt < datetime.now(timezone.utc) - cache_time:
logger.info("Cached leverage tiers are outdated. Will update.")
return None
return tiers["data"]
return tiers.get("data")
except Exception:
logger.exception("Error loading cached leverage tiers. Refreshing.")
return None