Files
mitai-jinkendo/backend
LarsandClaude Opus 4.6 6f035e3706
Deploy Development / deploy (push) Successful in 50s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 13s
fix: handle decimal values in Apple Health vitals import
Problem: Import failed with "invalid literal for int() with base 10: '37.95'"
because Apple Health exports HRV and other vitals with decimal values.

Root cause: Code used int() directly on string values with decimals.

Fix:
- Added safe_int(): parses decimals as float first, then rounds to int
- Added safe_float(): robust float parsing with error handling
- Applied to all vital value parsing: RHR, HRV, VO2 Max, SpO2, resp rate

Example: '37.95' → float(37.95) → int(38) ✓

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 16:50:08 +01:00
..
2026-03-19 09:49:46 +01:00