From b6d1e8df6b460fa6777a194ffec315dc06285ab6 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 28 Oct 2017 15:45:05 +0200 Subject: [PATCH] Set preferred for the card that's used for a subscription --- hosting/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index ff7221ad..04ae6b3b 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -911,10 +911,10 @@ class OrdersHostingDetailView(LoginRequiredMixin, ' the payment page.') ) } - return HttpResponse(json.dumps(response), - content_type="application/json") + return HttpResponse( + json.dumps(response), content_type="application/json" + ) if 'token' in request.session: - card_details_response['preferred']=True UserCardDetail.get_or_create_user_card_detail( stripe_customer=self.request.user.stripecustomer, card_details=card_details_response