diff options
author | Joris | 2023-04-17 20:50:58 +0200 |
---|---|---|
committer | Joris | 2023-04-17 20:50:58 +0200 |
commit | 8dcb9c6fff82f9e353e0f92b417dd803199f4257 (patch) | |
tree | b6e4bc19a28fb0a6cca87054a2294ee4d246e747 /src | |
parent | 75d96e813dbe48eda89321adccadccd40d9fbafa (diff) |
Upgrade dependencies
Diffstat (limited to 'src')
-rw-r--r-- | src/controller/incomes.rs | 2 | ||||
-rw-r--r-- | src/db/incomes.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/controller/incomes.rs b/src/controller/incomes.rs index ea7f1cf..b7fb3ed 100644 --- a/src/controller/incomes.rs +++ b/src/controller/incomes.rs @@ -70,7 +70,7 @@ async fn create_form_feedback( context.insert("connected_user", &wallet.user); context.insert("users", &users); context.insert("query", &query); - context.insert("current_month", &Utc::today().naive_utc().month()); + context.insert("current_month", &Utc::now().date_naive().month()); context.insert("months", &MONTHS); context.insert("form", &form); context.insert("error", &error); 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; |