From 068a8e7a8850e9bb810eef10f835f9a5d1385583 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 28 Mar 2026 14:41:33 +0100 Subject: [PATCH] debug: show goals after serialization --- backend/routers/goals.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/routers/goals.py b/backend/routers/goals.py index 43e40ef..3a1b76c 100644 --- a/backend/routers/goals.py +++ b/backend/routers/goals.py @@ -378,6 +378,15 @@ def list_goals(session: dict = Depends(require_auth)): # Serialize date objects to ISO format strings goals = serialize_dates(goals) + # Debug: Show what's being returned + print(f"[DEBUG] Returning {len(goals)} goals. First goal after serialization:") + if goals: + first = goals[0] + print(f" id: {first.get('id')}") + print(f" start_date: {first.get('start_date')} (type: {type(first.get('start_date'))})") + print(f" target_date: {first.get('target_date')} (type: {type(first.get('target_date'))})") + print(f" Keys in goal: {list(first.keys())}") + return goals except Exception as e: