forked from CGM_Public/pretix_original
Protect against fee signal returning None
This commit is contained in:
@@ -940,7 +940,8 @@ def get_fees(event, request, total, invoice_address, provider):
|
|||||||
|
|
||||||
for recv, resp in fee_calculation_for_cart.send(sender=event, request=request, invoice_address=invoice_address,
|
for recv, resp in fee_calculation_for_cart.send(sender=event, request=request, invoice_address=invoice_address,
|
||||||
total=total):
|
total=total):
|
||||||
fees += resp
|
if resp:
|
||||||
|
fees += resp
|
||||||
|
|
||||||
total = total + sum(f.value for f in fees)
|
total = total + sum(f.value for f in fees)
|
||||||
if provider and total != 0:
|
if provider and total != 0:
|
||||||
|
|||||||
@@ -594,7 +594,8 @@ def _get_fees(positions: List[CartPosition], payment_provider: BasePaymentProvid
|
|||||||
|
|
||||||
for recv, resp in order_fee_calculation.send(sender=event, invoice_address=address, total=total,
|
for recv, resp in order_fee_calculation.send(sender=event, invoice_address=address, total=total,
|
||||||
meta_info=meta_info, positions=positions):
|
meta_info=meta_info, positions=positions):
|
||||||
fees += resp
|
if resp:
|
||||||
|
fees += resp
|
||||||
|
|
||||||
total += sum(f.value for f in fees)
|
total += sum(f.value for f in fees)
|
||||||
if payment_provider:
|
if payment_provider:
|
||||||
|
|||||||
Reference in New Issue
Block a user