Mbonea commited on
Commit
60d3233
·
1 Parent(s): 9be5d05

balance assigned

Browse files
Files changed (1) hide show
  1. App/Users/Model.py +4 -2
App/Users/Model.py CHANGED
@@ -224,8 +224,10 @@ class User(models.Model):
224
  user_name=self.name, amount=amount, plan_name=plan_name
225
  )
226
  else:
227
- message = self.message_templates.payment_success_balance_message(
228
- user_name=self.name, amount=amount
 
 
229
  )
230
  try:
231
  await self.android_client.send_message(
 
224
  user_name=self.name, amount=amount, plan_name=plan_name
225
  )
226
  else:
227
+ self.balance += amount
228
+ await self.save()
229
+ message = self.message_templates.balance_assigned_message(
230
+ amount=amount, new_balance=self.balance
231
  )
232
  try:
233
  await self.android_client.send_message(