Commit 1d7c3f42 authored by PCoder's avatar PCoder

Don't send admin email if IncompletePaymentIntent lookup doesn't contain a value

parent 8deed169
...@@ -289,11 +289,11 @@ def handle_webhook(request): ...@@ -289,11 +289,11 @@ def handle_webhook(request):
billing_address_data=billing_address_data billing_address_data=billing_address_data
) )
except (IncompletePaymentIntents.DoesNotExist, except IncompletePaymentIntents.DoesNotExist as ex:
IncompletePaymentIntents.MultipleObjectsReturned, logger.error(str(ex))
except (IncompletePaymentIntents.MultipleObjectsReturned,
Exception) as ex: Exception) as ex:
logger.error(str(ex)) logger.error(str(ex))
email_data = { email_data = {
'subject': "IncompletePaymentIntents error", 'subject': "IncompletePaymentIntents error",
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS, 'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment