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
Showing only changes of commit eb8b503faa - Show all commits

View File

@ -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