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):
billing_address_data=billing_address_data
)
incomplete_pm.save()
except (IncompletePaymentIntents.DoesNotExist,
IncompletePaymentIntents.MultipleObjectsReturned,
except IncompletePaymentIntents.DoesNotExist as ex:
logger.error(str(ex))
except (IncompletePaymentIntents.MultipleObjectsReturned,
Exception) as ex:
logger.error(str(ex))
logger.debug(str(ex))
email_data = {
'subject': "IncompletePaymentIntents error",
'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