Prevent duplicate payment confirmation mails

This commit is contained in:
Raphael Michel
2017-01-22 17:46:56 +01:00
parent 04369ff4f1
commit 221526c979
3 changed files with 11 additions and 2 deletions

View File

@@ -42,8 +42,10 @@ class CartActionMixin:
amount = int(value)
except ValueError:
raise CartError(_('Please enter numbers only.'))
if amount <= 0:
if amount < 0:
raise CartError(_('Please enter positive numbers only.'))
elif amount == 0:
return
price = self.request.POST.get('price_' + "_".join(parts[1:]), "")
if key.startswith('item_'):