diff --git a/CHANGELOG.md b/CHANGELOG.md index 90f1f82..f9eda28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.10.12] - 2026-01-08 + +### Fixed + +- **Forecast data retrieval** - Pass raw_data to service instead of extracting wrong field + - Qdrant client was extracting `days` (integer 7) instead of `daily` (list) + - Now passes full raw_data for service to parse correctly + ## [1.10.11] - 2026-01-08 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index 1a7cd3a..a15ab2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "core-api" -version = "1.10.11" +version = "1.10.12" description = "Core Code API - Infrastructure management and tools API" readme = "README.md" requires-python = ">=3.12" diff --git a/src/shared/clients/qdrant_client.py b/src/shared/clients/qdrant_client.py index a52a1c0..8d8ab46 100644 --- a/src/shared/clients/qdrant_client.py +++ b/src/shared/clients/qdrant_client.py @@ -190,19 +190,10 @@ class QdrantReadClient: if aqi: result["air_quality"] = aqi if isinstance(aqi, dict) else {"aqi": aqi} - # Fetch forecast data + # Fetch forecast data - pass raw_data to service for parsing forecast_records = await self.get_by_namespace(user, "forecast") if forecast_records: - # Forecast might be a single record with list or multiple records - first_record = forecast_records[0].get("raw_data") - if isinstance(first_record, list): - result["forecast"] = first_record - elif isinstance(first_record, dict): - # Could be a dict with 'days' or 'forecast' key - result["forecast"] = first_record.get( - "days", - first_record.get("forecast", [first_record]) - ) + result["forecast"] = forecast_records[0].get("raw_data") # Fetch sun times data sun_records = await self.get_by_namespace(user, "sun")