This commit is contained in:
@@ -55,12 +55,11 @@ impl UpdateMovementQuery {
|
||||
if let Ok(movement) =
|
||||
get_by_account_label_amount_time(self.account_id, &self.label, self.amount, self.time)
|
||||
.await
|
||||
&& Some(movement.id()) != ref_movement
|
||||
{
|
||||
if Some(movement.id()) != ref_movement {
|
||||
return Ok(Some(
|
||||
"A movement taken at the same time with the same label and the same amount already exists!",
|
||||
));
|
||||
}
|
||||
return Ok(Some(
|
||||
"A movement taken at the same time with the same label and the same amount already exists!",
|
||||
));
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
|
||||
Reference in New Issue
Block a user