From c70753767fb577ac05fc7fa9971be8ba2bcb0c61 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 23 Dec 2020 12:32:42 +0530 Subject: [PATCH] Load request object correctly and pass correct subscription object --- webhook/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webhook/views.py b/webhook/views.py index 203716e4..9381239a 100644 --- a/webhook/views.py +++ b/webhook/views.py @@ -146,14 +146,13 @@ def handle_webhook(request): logger.debug(incomplete_sub) logger.debug("*******") do_create_vm( - request=incomplete_sub.request, + request=json.loads(incomplete_sub.request), user={'name': incomplete_sub.name, 'email': incomplete_sub.email}, stripe_api_cus_id=incomplete_sub.stripe_api_cus_id, card_details_response=json.loads( incomplete_sub.card_details_response), - stripe_subscription_obj=json.loads( - incomplete_sub.stripe_subscription_obj), + stripe_subscription_obj=stripe_subscription_obj, stripe_onetime_charge=json.loads( incomplete_sub.stripe_onetime_charge), gp_details=json.loads(incomplete_sub.gp_details),