diff options
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/ecb_interest_rates.py')
-rw-r--r-- | openbb_platform/core/openbb_core/provider/standard_models/ecb_interest_rates.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/ecb_interest_rates.py b/openbb_platform/core/openbb_core/provider/standard_models/ecb_interest_rates.py index da0bafff88e..13128cc1278 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/ecb_interest_rates.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/ecb_interest_rates.py @@ -5,7 +5,7 @@ from datetime import ( ) from typing import Literal, Optional -from pydantic import Field +from pydantic import Field, field_validator from openbb_core.provider.abstract.data import Data from openbb_core.provider.abstract.query_params import QueryParams @@ -31,6 +31,12 @@ class EuropeanCentralBankInterestRatesParams(QueryParams): description="The type of interest rate.", ) + @field_validator("interest_rate_type", mode="before", check_fields=False) + @classmethod + def to_lower(cls, v: Optional[str]) -> Optional[str]: + """Convert field to lowercase.""" + return v.lower() if v else v + class EuropeanCentralBankInterestRatesData(Data): """European Central Bank Interest Rates Data.""" |