mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-13 04:41:24 +00:00
fix Q4 label sub (#6465)
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
This commit is contained in:
@@ -461,7 +461,7 @@ class IntrinioBalanceSheetFetcher(
|
||||
for p in fiscal_periods
|
||||
]
|
||||
|
||||
return await amake_requests(urls, callback, **kwargs)
|
||||
return await amake_requests(urls, callback, **kwargs) # type: ignore
|
||||
|
||||
@staticmethod
|
||||
def transform_data(
|
||||
@@ -469,6 +469,7 @@ class IntrinioBalanceSheetFetcher(
|
||||
) -> List[IntrinioBalanceSheetData]:
|
||||
"""Return the transformed data."""
|
||||
transformed_data: List[IntrinioBalanceSheetData] = []
|
||||
period = "FY" if query.period == "annual" else "QTR"
|
||||
units = []
|
||||
for item in data:
|
||||
sub_dict: Dict[str, Any] = {}
|
||||
@@ -490,7 +491,7 @@ class IntrinioBalanceSheetFetcher(
|
||||
sub_dict["reported_currency"] = list(set(units))[0]
|
||||
|
||||
# Intrinio does not return Q4 data but FY data instead
|
||||
if query.period == "QTR" and item["fiscal_period"] == "FY":
|
||||
if period == "QTR" and item["fiscal_period"] == "FY":
|
||||
sub_dict["fiscal_period"] = "Q4"
|
||||
|
||||
transformed_data.append(IntrinioBalanceSheetData(**sub_dict))
|
||||
|
||||
Reference in New Issue
Block a user