diff options
| author | soryu <soryu@soryu.co> | 2026-01-31 22:17:31 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-31 22:17:31 +0000 |
| commit | a6e36a8bfecb9ebe6c7b135b9e01557f7ebc3e58 (patch) | |
| tree | bfce447ceae3c26dfec85ba8b7def731ee8caad0 /makima/src/daemon/api | |
| parent | 3ea2c72e2c50c0d73614d9ac82f41508b6ab1ce4 (diff) | |
| download | soryu-a6e36a8bfecb9ebe6c7b135b9e01557f7ebc3e58.tar.gz soryu-a6e36a8bfecb9ebe6c7b135b9e01557f7ebc3e58.zip | |
Fix null handling for deliverables in create_template_for_owner (#51)
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/daemon/api')
0 files changed, 0 insertions, 0 deletions
