From 0d4287d36ffab8506cd0b136b232976258833a07 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 12 Jun 2019 06:07:16 +0200 Subject: [PATCH] Add missing param --- webhook/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webhook/views.py b/webhook/views.py index aabbf9c4..971d1d98 100644 --- a/webhook/views.py +++ b/webhook/views.py @@ -1,15 +1,16 @@ import logging -import stripe +import stripe # Create your views here. from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST -from membership.models import StripeCustomer from hosting.models import MonthlyHostingBill, HostingBillLineItem +from membership.models import StripeCustomer from utils.tasks import send_plain_email_task + logger = logging.getLogger(__name__) @@ -110,7 +111,7 @@ def handle_invoice_webhook(request): elif event.type == "invoice.payment_failed": logger.error("Invoice payment failed") - admin_msg_sub = "Invoice payment FAILED for user {} and ".format( + admin_msg_sub = "Invoice payment FAILED for user {} and {}".format( stripe_customer.user.email, invoice.lines.data.metadata )