From a6701bf7b2804f3dd701576a6ed9fd9c0143d8e6 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 28 Mar 2026 13:02:43 +0100 Subject: [PATCH] fix: Include start_value in get_active_goals query Goal progress placeholders were filtering out all goals because start_value was missing from the SELECT statement. Added start_value to both: - get_active_goals() - for placeholder formatters - get_goal_by_id() - for consistency This will fix: - active_goals_md progress column (was all "-") - top_3_goals_behind_schedule (was "keine Ziele") - top_3_goals_on_track (was "keine Ziele") Co-Authored-By: Claude Opus 4.6 --- backend/goal_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/goal_utils.py b/backend/goal_utils.py index f128325..2adc14b 100644 --- a/backend/goal_utils.py +++ b/backend/goal_utils.py @@ -542,7 +542,7 @@ def get_active_goals(profile_id: str) -> List[Dict]: cur = get_cursor(conn) cur.execute(""" SELECT id, goal_type, name, target_value, target_date, - current_value, progress_pct, status, is_primary + current_value, start_value, progress_pct, status, is_primary FROM goals WHERE profile_id = %s AND status IN ('active', 'in_progress') @@ -558,7 +558,7 @@ def get_goal_by_id(goal_id: str) -> Optional[Dict]: cur = get_cursor(conn) cur.execute(""" SELECT id, profile_id, goal_type, target_value, target_date, - current_value, progress_pct, status, is_primary + current_value, start_value, progress_pct, status, is_primary FROM goals WHERE id = %s """, (goal_id,))