Correction commit f9c8708

This commit is contained in:
Aurélien Delobelle 2016-08-08 04:11:08 +02:00
parent f9c87088fc
commit 897986fec8

View file

@ -449,7 +449,7 @@ def kpsul_perform_operations(request):
operationgroup.amount += operation.amount operationgroup.amount += operation.amount
# 4 # 4
if operation.type == Operation.DEPOSIT: if operation.type == Operation.DEPOSIT:
required_perms.append('kfet.can_perform_deposit') required_perms.append('kfet.perform_deposit')
# Starting transaction to ensure data consistency # Starting transaction to ensure data consistency
# Using select_for_update where it is critical # Using select_for_update where it is critical
@ -478,7 +478,7 @@ def kpsul_perform_operations(request):
on_acc.save() on_acc.save()
# Saving addcost_for with new balance if there is one # Saving addcost_for with new balance if there is one
if is_addcost: if is_addcost:
addcost_for += addcost_total addcost_for.balance += addcost_total
addcost_for.save() addcost_for.save()
# Saving operation group # Saving operation group