From b5f41fe411ea2895da1e16ff307f324514154c24 Mon Sep 17 00:00:00 2001 From: Henrique Joaquim Date: Mon, 5 Feb 2024 23:28:57 +0000 Subject: [PATCH] Hotfix/wrong pydantic validator (#6037) * format w new black * Revert "format w new black" This reverts commit 74b9619cc6b565f85aef1e89fc01900b86c8b991. * Use field_validator instead --- .../providers/fmp/openbb_fmp/models/index_historical.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py index eb0731f3bc0..01de38af1a8 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py @@ -12,7 +12,7 @@ from openbb_core.provider.standard_models.index_historical import ( from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS from openbb_core.provider.utils.helpers import get_querystring from openbb_fmp.utils.helpers import get_data_many -from pydantic import Field, NonNegativeInt, validator +from pydantic import Field, NonNegativeInt, field_validator class FMPIndexHistoricalQueryParams(IndexHistoricalQueryParams): @@ -30,7 +30,7 @@ class FMPIndexHistoricalQueryParams(IndexHistoricalQueryParams): Field(default="1day", description="Data granularity.") ) - @validator("interval") + @field_validator("interval") @classmethod def map_interval(cls, v): """Map the interval from standard to the FMP format."""