diff options
Diffstat (limited to 'src/controller')
-rw-r--r-- | src/controller/incomes.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/controller/incomes.rs b/src/controller/incomes.rs index b7fb3ed..cc66ed6 100644 --- a/src/controller/incomes.rs +++ b/src/controller/incomes.rs @@ -97,8 +97,7 @@ pub async fn create( if !db::incomes::defined_at( &wallet.pool, income.user_id, - income.month, - income.year, + income.date, ) .await .is_empty() @@ -180,8 +179,7 @@ pub async fn update( let existing_incomes = db::incomes::defined_at( &wallet.pool, income.user_id, - income.month, - income.year, + income.date, ) .await; if existing_incomes.into_iter().any(|eid| eid != id) { |