fix: pass forecast raw_data to service for parsing
Qdrant client was extracting 'days' (int) instead of 'daily' (list) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
26ecc3e5fd
commit
768cea2c89
@@ -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/),
|
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).
|
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
|
## [1.10.11] - 2026-01-08
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "core-api"
|
name = "core-api"
|
||||||
version = "1.10.11"
|
version = "1.10.12"
|
||||||
description = "Core Code API - Infrastructure management and tools API"
|
description = "Core Code API - Infrastructure management and tools API"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
|
|||||||
@@ -190,19 +190,10 @@ class QdrantReadClient:
|
|||||||
if aqi:
|
if aqi:
|
||||||
result["air_quality"] = aqi if isinstance(aqi, dict) else {"aqi": 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")
|
forecast_records = await self.get_by_namespace(user, "forecast")
|
||||||
if forecast_records:
|
if forecast_records:
|
||||||
# Forecast might be a single record with list or multiple records
|
result["forecast"] = forecast_records[0].get("raw_data")
|
||||||
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])
|
|
||||||
)
|
|
||||||
|
|
||||||
# Fetch sun times data
|
# Fetch sun times data
|
||||||
sun_records = await self.get_by_namespace(user, "sun")
|
sun_records = await self.get_by_namespace(user, "sun")
|
||||||
|
|||||||
Reference in New Issue
Block a user