Small code reorganizing

This commit is contained in:
M.Ravi 2017-09-29 09:16:00 +02:00
parent 5c99dd4da7
commit 5393ffa10d

View file

@ -517,8 +517,8 @@ class OrderConfirmationView(DetailView):
'response_object').stripe_plan_id}])
stripe_subscription_obj = subscription_result.get('response_object')
# Check if the subscription was approved and is active
if stripe_subscription_obj is None or \
stripe_subscription_obj.status != 'active':
if (stripe_subscription_obj is None
or stripe_subscription_obj.status != 'active'):
msg = subscription_result.get('error')
messages.add_message(self.request, messages.ERROR, msg,
extra_tags='failed_payment')