diff options
| author | soryu <soryu@soryu.co> | 2026-01-31 04:21:20 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-31 04:21:20 +0000 |
| commit | d65f012589e1563149cf8331a9d8307f28985248 (patch) | |
| tree | 9bb369e1f2c2cc66cf84f6d5cb5b55f68e4a53fe /makima/src/main.rs | |
| parent | dac1adb138f532245a36fa16524f1e4fb9990173 (diff) | |
| download | soryu-makima/fix-deliverables-null-handling.tar.gz soryu-makima/fix-deliverables-null-handling.zip | |
Fix null handling for deliverables in create_template_for_ownermakima/fix-deliverables-null-handling
The previous code used `.unwrap_or_default()` which could produce
`Some(Value::Null)` if JSON serialization failed, leading to
inconsistent handling when the database returned NULL and sqlx
attempted to decode with the `#[sqlx(json)]` attribute on an Option type.
Changed to use `.ok()` which properly returns `None` when serialization
fails, ensuring consistent NULL handling between the application and
database layer.
Fixes: "Failed to create template: error occurred while decoding column
'deliverables': unexpected null; try decoding as an Option"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/main.rs')
0 files changed, 0 insertions, 0 deletions
