Protect query on Eboutic to prevend double basket validation

This commit is contained in:
Skia 2016-11-22 17:04:12 +01:00
parent cfbd610305
commit 02be5e1629
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ class EtransactionAutoAnswer(View):
if request.GET['Error'] == "00000":
try:
with transaction.atomic():
b = Basket.objects.filter(id=request.GET['BasketID']).first()
b = Basket.objects.select_for_update().filter(id=request.GET['BasketID']).first()
if b is None:
raise SuspiciousOperation("Basket does not exists")
i = Invoice()