From 62e098a13172c7f37562943ca52ef8b6cc9cd216 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 28 Sep 2025 17:22:39 -0400 Subject: [PATCH] Fix digital product detection in crypto payment status views - Replace non-existent download_instructions attribute with proper is_physical check - Assume digital by default and only mark as non-digital if any product is physical - Fixes AttributeError during crypto payment finalization for both XMR and DOGE --- make_post_sell/views/crypto.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/make_post_sell/views/crypto.py b/make_post_sell/views/crypto.py index 9c21236..c858375 100644 --- a/make_post_sell/views/crypto.py +++ b/make_post_sell/views/crypto.py @@ -760,11 +760,11 @@ def crypto_xmr_status(request): ) elif current_status == "confirmed": # Check if it's a digital product by looking at line items - has_digital = False + has_digital = True if crypto_payment.invoice: for line_item in crypto_payment.invoice.line_items: - if line_item.product and line_item.product.download_instructions: - has_digital = True + if line_item.product and line_item.product.is_physical: + has_digital = False break if has_digital: @@ -856,11 +856,11 @@ def crypto_doge_status(request): ) elif current_status == "confirmed": # Check if it's a digital product by looking at line items - has_digital = False + has_digital = True if crypto_payment.invoice: for line_item in crypto_payment.invoice.line_items: - if line_item.product and line_item.product.download_instructions: - has_digital = True + if line_item.product and line_item.product.is_physical: + has_digital = False break if has_digital: