fix: Phase 0b - replace non-existent get_goals_by_type import
Deploy Development / deploy (push) Successful in 52s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s

ImportError: cannot import name 'get_goals_by_type' from 'goal_utils'

Changes:
- body_metrics.py: Use get_active_goals() + filter by type_key
- nutrition_metrics.py: Remove unused import (dead code)

Result: Score functions no longer crash on import error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-03-28 11:04:28 +01:00
1 parent cc76ae677b
commit 202c36fad7
2 files changed
+5 -7

No files matched your search

@@ -392,9 +392,6 @@ def calculate_nutrition_score(profile_id: str, focus_weights: Optional[Dict] = N
def _score_calorie_adherence(profile_id: str) -> Optional[int]:
"""Score calorie target adherence (0-100)"""
# Get goal (if exists)
from goal_utils import get_goals_by_type
# Check for energy balance goal
# For now, use energy balance calculation
balance = calculate_energy_balance_7d(profile_id)