From 207c3a6c6c7930b710eadb351e65b542c5dfc46b Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 1 Jul 2019 08:57:39 +0530 Subject: [PATCH] Skip SSH key page for generic products page --- datacenterlight/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 28372a89..edc95ee9 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -522,6 +522,12 @@ class PaymentOrderView(FormView): request.session['customer'] = customer.stripe_id else: request.session['customer'] = customer + + # For generic payment we take the user directly to confirmation + if ('generic_payment_type' in request.session and + self.request.session['generic_payment_type'] == 'generic'): + return HttpResponseRedirect( + reverse('datacenterlight:order_confirmation')) return HttpResponseRedirect( reverse('datacenterlight:add_ssh_key')) else: