summaryrefslogtreecommitdiffstats
path: root/openbb_platform/core/openbb_core/provider/standard_models/hqm.py
diff options
context:
space:
mode:
Diffstat (limited to 'openbb_platform/core/openbb_core/provider/standard_models/hqm.py')
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/hqm.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/hqm.py b/openbb_platform/core/openbb_core/provider/standard_models/hqm.py
index e4c6efde353..233cec3891c 100644
--- a/openbb_platform/core/openbb_core/provider/standard_models/hqm.py
+++ b/openbb_platform/core/openbb_core/provider/standard_models/hqm.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
@@ -27,6 +27,12 @@ class HighQualityMarketCorporateBondQueryParams(QueryParams):
description="The yield curve type.",
)
+ @field_validator("yield_curve", 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 HighQualityMarketCorporateBondData(Data):
"""High Quality Market Corporate Bond Data."""