From 768cea2c893471e8e6b79252d9928ff9db6002a7 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 8 Jan 2026 18:45:24 +0100 Subject: [PATCH] fix: pass forecast raw_data to service for parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/shared/clients/qdrant_client.py | 13 ++----------- 3 files changed, 11 insertions(+), 12 deletions(-) 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")