Production Release: RestDays Widget + Trainingstyp Fix #16

Merged
Lars merged 10 commits from develop into main 2026-03-23 09:24:17 +01:00
Showing only changes of commit f2e2aff17f - Show all commits

View File

@ -93,15 +93,11 @@ def create_rest_day(
with get_db() as conn:
cur = get_cursor(conn)
# Upsert by (profile_id, date)
# Insert (multiple entries per date allowed)
cur.execute(
"""
INSERT INTO rest_days (profile_id, date, rest_config, note, created_at)
VALUES (%s, %s, %s, %s, CURRENT_TIMESTAMP)
ON CONFLICT (profile_id, date)
DO UPDATE SET
rest_config = EXCLUDED.rest_config,
note = EXCLUDED.note
RETURNING id, profile_id, date, rest_config, note, created_at
""",
(pid, data.date, Json(config_dict), data.note)