V 0.9h dynamic focus area system #51
|
|
@ -720,6 +720,7 @@ def get_goals_grouped(session: dict = Depends(require_auth)):
|
||||||
focus_map = {} # goal_id → [contributions]
|
focus_map = {} # goal_id → [contributions]
|
||||||
|
|
||||||
if goal_ids:
|
if goal_ids:
|
||||||
|
try:
|
||||||
placeholders = ','.join(['%s'] * len(goal_ids))
|
placeholders = ','.join(['%s'] * len(goal_ids))
|
||||||
cur.execute(f"""
|
cur.execute(f"""
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -743,6 +744,10 @@ def get_goals_grouped(session: dict = Depends(require_auth)):
|
||||||
'category': row['category'],
|
'category': row['category'],
|
||||||
'contribution_weight': float(row['contribution_weight'])
|
'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
|
# Group by category and attach focus_contributions
|
||||||
grouped = {}
|
grouped = {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user