mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
PPv2: Fix processing of purchase_units without payments
This commit is contained in:
@@ -791,6 +791,7 @@ class PaypalMethod(BasePaymentProvider):
|
|||||||
any_captures = False
|
any_captures = False
|
||||||
all_captures_completed = True
|
all_captures_completed = True
|
||||||
for purchaseunit in pp_captured_order.purchase_units:
|
for purchaseunit in pp_captured_order.purchase_units:
|
||||||
|
if hasattr(purchaseunit, 'payments'):
|
||||||
for capture in purchaseunit.payments.captures:
|
for capture in purchaseunit.payments.captures:
|
||||||
try:
|
try:
|
||||||
ReferencedPayPalObject.objects.get_or_create(order=payment.order, payment=payment, reference=capture.id)
|
ReferencedPayPalObject.objects.get_or_create(order=payment.order, payment=payment, reference=capture.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user