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

This commit is contained in:
PCoder 2021-01-01 11:17:07 +05:30
parent 8deed169ca
commit 1d7c3f424c
1 changed files with 3 additions and 3 deletions

View File

@ -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,