Ignore quota errors during order creation

This commit is contained in:
Raphael Michel
2019-04-23 09:47:44 +02:00
parent 02e936ee7a
commit ad8fdd6935

View File

@@ -678,7 +678,10 @@ def _perform_order(event: str, payment_provider: str, position_ids: List[str],
free_order_flow = payment and payment_provider == 'free' and order.total == Decimal('0.00') and not order.require_approval
if free_order_flow:
payment.confirm(send_mail=False, lock=False)
try:
payment.confirm(send_mail=False, lock=False)
except Quota.QuotaExceededException:
pass
invoice = order.invoices.last() # Might be generated by plugin already
if event.settings.get('invoice_generate') == 'True' and invoice_qualified(order):