fix fmp equity profile for untraded symbol (#7012)

This commit is contained in:
Danglewood
2025-01-28 12:25:45 -08:00
committed by GitHub
parent c5e60a2a6e
commit c9ea90e786

View File

@@ -164,7 +164,9 @@ class FMPEquityProfileFetcher(
"""Return the transformed data."""
results: List[FMPEquityProfileData] = []
for d in data:
d["year_low"], d["year_high"] = d.get("range", "-").split("-")
d["year_low"], d["year_high"] = (
d.get("range", "-").split("-") if d.get("range") else (None, None)
)
# Clear out fields that don't belong and can be had elsewhere.
entries_to_remove = (