diff options
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/index_historical.py')
-rw-r--r-- | openbb_platform/core/openbb_core/provider/standard_models/index_historical.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py b/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py index f9a381698cb..5a0a9f31579 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py @@ -42,10 +42,16 @@ class IndexHistoricalQueryParams(QueryParams): @field_validator("symbol", mode="before", check_fields=False) @classmethod - def upper_symbol(cls, v: str) -> str: - """Convert symbol to uppercase.""" + def to_upper(cls, v: str) -> str: + """Convert field to uppercase.""" return v.upper() + @field_validator("sort", 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 IndexHistoricalData(Data): """Index Historical Data.""" |