From a03e2dc00625dc80775d04b10d76b40daa10b413 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 23 Dec 2020 18:10:17 +0530 Subject: [PATCH] Return provisioning if set in do_provisioning --- datacenterlight/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index aea7dcbd..17690c78 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -1020,7 +1020,7 @@ class OrderConfirmationView(DetailView, FormView): "requires_source_action") msg = subscription_result.get('error') return show_error(msg, self.request) - do_provisioning( + provisioning_response = do_provisioning( req, user, stripe_api_cus_id, card_details_response, stripe_subscription_obj, stripe_onetime_charge, gp_details, specs, vm_template_id, @@ -1034,6 +1034,10 @@ class OrderConfirmationView(DetailView, FormView): CustomUser.MultipleObjectsReturned) as ex: logger.error(str(ex)) + if (provisioning_response and + type(provisioning_response) == JsonResponse): + return provisioning_response + response = { 'status': True, 'redirect': (