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 <noreply@anthropic.com>
This commit is contained in:
parent
befc310958
commit
a6701bf7b2
|
|
@ -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,))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user