Fallback to vm_id from order if its not set in metadata
This commit is contained in:
parent
d64b6329ab
commit
22accdd0d0
1 changed files with 3 additions and 0 deletions
|
|
@ -88,6 +88,9 @@ def handle_invoice_webhook(request):
|
||||||
mbli = HostingBillLineItem.objects.filter(monthly_hosting_bill=mhb).first()
|
mbli = HostingBillLineItem.objects.filter(monthly_hosting_bill=mhb).first()
|
||||||
vm_id = mbli.get_vm_id()
|
vm_id = mbli.get_vm_id()
|
||||||
|
|
||||||
|
if vm_id is None:
|
||||||
|
vm_id = mhb.order.vm_id
|
||||||
|
|
||||||
# Send an email to admin
|
# Send an email to admin
|
||||||
admin_msg_sub = "Invoice payment success for user {} and VM {}".format(
|
admin_msg_sub = "Invoice payment success for user {} and VM {}".format(
|
||||||
stripe_customer.user.email,
|
stripe_customer.user.email,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue