Sobes.tech
Middle+
2

def withdraw(user_id, amount): user = User.objects.filter(user_id=user_id).update(balance=F('balance') - amount) if user.balance > amount: # raise InsufficientFundsError() user.balance -= amount user.save()

Компании, где спрашивали
Группа «Самолет»