Problem: - Photo upload with empty date parameter (date='') - PostgreSQL rejects empty string for DATE field - Error: "invalid input syntax for type date: ''" - Occurred when saving circumference entry with only photo Fix: - Convert empty string to NULL before INSERT - Check: date if date and date.strip() else None - NULL is valid for optional date field Test case: - Circumference entry with only photo → should work now - Photo without date → stored with date=NULL ✓ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>