diff --git a/dbt_semantic_interfaces/implementations/metric.py b/dbt_semantic_interfaces/implementations/metric.py index b693d87d..f1dde96f 100644 --- a/dbt_semantic_interfaces/implementations/metric.py +++ b/dbt_semantic_interfaces/implementations/metric.py @@ -209,8 +209,8 @@ def parse_obj(cls, input: Any) -> PydanticMetric: data = deepcopy(input) # Ensure grain_to_date is lowercased - type_params = data.get("type_params", {}) - grain_to_date = type_params.get("cumulative_type_params", {}).get("grain_to_date") + type_params = data.get("type_params") or {} + grain_to_date = (type_params.get("cumulative_type_params") or {}).get("grain_to_date") if isinstance(grain_to_date, str): data["type_params"]["cumulative_type_params"]["grain_to_date"] = grain_to_date.lower() diff --git a/pyproject.toml b/pyproject.toml index dd762796..d0df5bc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dbt-semantic-interfaces" -version = "0.8.2" +version = "0.8.3" description = 'The shared semantic layer definitions that dbt-core and MetricFlow use' readme = "README.md" requires-python = ">=3.8"