Goals -System refactored - Platzhaltersystem enhanced (als draft) #53

Merged
Lars merged 86 commits from develop into main 2026-03-31 11:46:48 +02:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 285184ba89 - Show all commits

View File

@ -17,6 +17,7 @@ Version: 1.0
from typing import Dict, List, Optional
from datetime import datetime, timedelta, date
import statistics
from db import get_db, get_cursor, r2d
from data_layer.utils import calculate_confidence, safe_float, safe_int

View File

@ -620,9 +620,8 @@ def calculate_recomposition_quadrant(profile_id: str) -> Optional[str]:
def calculate_body_progress_score(profile_id: str, focus_weights: Optional[Dict] = None) -> Optional[int]:
"""Calculate body progress score (0-100) weighted by user's focus areas"""
if focus_weights is None:
from goal_utils import get_focus_weights
with get_db() as conn:
focus_weights = get_focus_weights(conn, profile_id)
from data_layer.scores import get_user_focus_weights
focus_weights = get_user_focus_weights(profile_id)
weight_loss = focus_weights.get('weight_loss', 0)
muscle_gain = focus_weights.get('muscle_gain', 0)