Merge remote-tracking branch 'origin/main' into devel
This commit is contained in:
commit
cb580d4ea8
@ -349,6 +349,11 @@ impl BufferedRpcQueryStats {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// (1) Do some general bookkeeping on the user
|
// (1) Do some general bookkeeping on the user
|
||||||
|
if self.sum_credits_used == 0 {
|
||||||
|
// return early because theres no need to touch the balance table
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let sender_balance = match balance::Entity::find()
|
let sender_balance = match balance::Entity::find()
|
||||||
.filter(balance::Column::UserId.eq(sender_user_id))
|
.filter(balance::Column::UserId.eq(sender_user_id))
|
||||||
.one(db_conn)
|
.one(db_conn)
|
||||||
|
Loading…
Reference in New Issue
Block a user