V 0.9h dynamic focus area system #51

Merged
Lars merged 11 commits from develop into main 2026-03-27 21:14:40 +01:00
Showing only changes of commit ba5d460e92 - Show all commits

View File

@ -720,6 +720,7 @@ def get_goals_grouped(session: dict = Depends(require_auth)):
focus_map = {} # goal_id → [contributions]
if goal_ids:
try:
placeholders = ','.join(['%s'] * len(goal_ids))
cur.execute(f"""
SELECT
@ -743,6 +744,10 @@ def get_goals_grouped(session: dict = Depends(require_auth)):
'category': row['category'],
'contribution_weight': float(row['contribution_weight'])
})
except Exception as e:
# Migration 031 not yet applied - focus_contributions tables don't exist
print(f"[WARNING] Could not load focus_contributions: {e}")
# Continue without focus_contributions (backward compatible)
# Group by category and attach focus_contributions
grouped = {}