aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/db')
-rw-r--r--src/db/incomes.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db/incomes.rs b/src/db/incomes.rs
index 5f44398..f2eaf1c 100644
--- a/src/db/incomes.rs
+++ b/src/db/incomes.rs
@@ -139,7 +139,7 @@ VALUES
"#,
)
.bind(i.user_id)
- .bind(NaiveDate::from_ymd(i.year, i.month, 1))
+ .bind(NaiveDate::from_ymd_opt(i.year, i.month, 1)?)
.bind(i.amount)
.execute(pool)
.await;