@ -27,6 +27,10 @@ def new(request):
if request.method != 'POST':
return redirect('account:index')
if Payment.objects.filter(user=request.user, status='new').count() > 10:
messages.error(request, "Too many open payments.")
form = NewPaymentForm(request.POST)
if not form.is_valid():