debug: Add logging to update_goal to trace start_date issue
All checks were successful
Deploy Development / deploy (push) Successful in 51s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s

This commit is contained in:
Lars 2026-03-28 13:24:29 +01:00
parent 7ffa8f039b
commit 42cc583b9b

View File

@ -438,6 +438,14 @@ def update_goal(goal_id: str, data: GoalUpdate, session: dict = Depends(require_
"""Update existing goal""" """Update existing goal"""
pid = session['profile_id'] pid = session['profile_id']
# Debug logging
print(f"[DEBUG] update_goal called with:")
print(f" goal_id: {goal_id}")
print(f" start_date: {data.start_date} (type: {type(data.start_date)})")
print(f" start_value: {data.start_value}")
print(f" target_date: {data.target_date}")
print(f" target_value: {data.target_value}")
with get_db() as conn: with get_db() as conn:
cur = get_cursor(conn) cur = get_cursor(conn)