summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrique Joaquim <h.joaquim@campus.fct.unl.pt>2024-02-05 23:28:57 +0000
committerGitHub <noreply@github.com>2024-02-05 23:28:57 +0000
commitb5f41fe411ea2895da1e16ff307f324514154c24 (patch)
tree72ec4bbc6c79be19975b55396adf8e1337209c5f
parent7c953d5964b1a5b5427dc2b2d188ccaed66acbdb (diff)
Hotfix/wrong pydantic validator (#6037)
* format w new black * Revert "format w new black" This reverts commit 74b9619cc6b565f85aef1e89fc01900b86c8b991. * Use field_validator instead
-rw-r--r--openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py4
1 files 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."""