Пример #1
0
 def change_balance(self, user: User, value: float):
     with self.c:
         user.balance = user.balance + float(value)
         self.update_user(user=user)
Пример #2
0
 def top_up_user_balance(self, user: User, amount: (int or float)):
     user.balance = float(user.balance) + float(amount)
     self.update_user_in_db(user)