Commit Graph

4 Commits

Author SHA1 Message Date
6850abf7d2 fix partial-update overwrite bug in snitch and adaptive meds PUT handlers
Both handlers were building update_data with defaults for every field,
so a partial save (e.g. toggling one toggle) would silently reset all
other settings back to their defaults. Now only fields explicitly
present in the request body are written to the DB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 19:05:09 -06:00
f826e511d5 fixing snitch and adaptive medication timing persistance and logic 2026-02-17 18:52:35 -06:00
Chelsea
a2c7940a5c Fix issues #8, #9, #10, #11: scheduling conflicts, med reminders, adaptive timing, nagging
- #11: Add validation to prevent simultaneous scheduling of routines and medications
  - Added _check_schedule_conflicts() in routines.py
  - Added _check_med_schedule_conflicts() in medications.py
  - Returns HTTP 409 with descriptive error on conflict

- #10: Fix medication reminders not being sent
  - Added call to check_adaptive_medication_reminders() in daemon poll loop

- #9: Fix can't enable adaptive timing
  - Added proper error handling and logging in update_adaptive_settings()
  - Returns meaningful error message on database failures

- #8: Fix nagging not working
  - Added debug logging for missing settings
  - Auto-create medication schedules if they don't exist
  - Improved error logging (warning -> error)
2026-02-17 04:20:34 +00:00
d4fb41ae6b Add adaptive medication timing, Discord presence tracking, and nagging system 2026-02-16 20:00:53 -06:00