Return provisioning if set in do_provisioning

This commit is contained in:
PCoder 2020-12-23 18:10:17 +05:30
parent c28bd9091a
commit a03e2dc006

View file

@ -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': (