diff --git a/backend/placeholder_resolver.py b/backend/placeholder_resolver.py index 5b4a037..e8b8931 100644 --- a/backend/placeholder_resolver.py +++ b/backend/placeholder_resolver.py @@ -867,7 +867,9 @@ def _format_goals_behind(profile_id: str, n: int = 3) -> str: created_at = g.get('created_at') if created_at: start_dt = date.fromisoformat(str(created_at).split('T')[0]) + print(f"[DEBUG] → Using created_at as start_date: {start_dt}") else: + print(f"[DEBUG] → Skipped: No start_date and no created_at") continue # Can't calculate without start date target_dt = target_date if isinstance(target_date, date) else date.fromisoformat(str(target_date)) @@ -877,6 +879,7 @@ def _format_goals_behind(profile_id: str, n: int = 3) -> str: elapsed_days = (today - start_dt).days if total_days <= 0: + print(f"[DEBUG] → Skipped: Invalid date range (total_days={total_days})") continue # Invalid date range expected_progress_pct = (elapsed_days / total_days) * 100