From 2f98294eab6a1c52013f2f8cd7071581d03a4f7e Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 31 Dec 2020 17:12:17 +0530 Subject: [PATCH] Store dicts as json in db --- datacenterlight/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 5b67d87c..44e871a5 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -757,11 +757,11 @@ class OrderConfirmationView(DetailView, FormView): request=create_incomplete_intent_request(self.request), payment_intent_id=payment_intent.id, stripe_api_cus_id=request.session['customer'], - card_details_response=card_details_response, + card_details_response=json.dumps(card_details_response), stripe_subscription_id=None, stripe_charge_id=None, - gp_details=request.session["generic_payment_details"], - billing_address_data=request.session["billing_address_data"] + gp_details=json.dumps(request.session["generic_payment_details"]), + billing_address_data=json.dumps(request.session["billing_address_data"]) ) logger.debug("IncompletePaymentIntent done") return render(request, self.template_name, context)