From a5396ac961b848874ccc0a1c5ebf565c0e4e99a6 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:55:47 +0100 Subject: [PATCH] Fix vwap FMP error (#5936) * Fix vwap FMP error * Linting * Painlint --- .../fmp/openbb_fmp/models/currency_historical.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py index dbdd905f623..3367258558e 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py @@ -100,4 +100,12 @@ class FMPCurrencyHistoricalFetcher( query: FMPCurrencyHistoricalQueryParams, data: List[Dict], **kwargs: Any ) -> List[FMPCurrencyHistoricalData]: """Return the transformed data.""" + # pylint: disable=unused-argument + data = [ + d + for d in data + if d.get("vwap") != 0 + and d.get("change") != 0 + and d.get("changeOverTime") != 0 + ] return [FMPCurrencyHistoricalData.model_validate(d) for d in data]