From 35736ae593447c32f6d49ab0dcae04bbafc0ab51 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 18 Aug 2017 01:49:27 +0530 Subject: [PATCH] Refactored some code --- hosting/models.py | 3 ++- utils/stripe_utils.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hosting/models.py b/hosting/models.py index 62717a79..3aa27fbe 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -90,7 +90,8 @@ class HostingOrder(AssignPermissionsMixin, models.Model): def set_subscription_id(self, subscription_object): """ - When creating a subscription, we have subscription id. We store this in the subscription_id field + When creating a Stripe subscription, we have subscription id. We store this in the subscription_id field. + This method sets the subscription id from subscription_object. :param subscription_object: Stripe's subscription object :return: diff --git a/utils/stripe_utils.py b/utils/stripe_utils.py index 36056fac..da1594d3 100644 --- a/utils/stripe_utils.py +++ b/utils/stripe_utils.py @@ -1,8 +1,6 @@ import logging - import stripe from django.conf import settings - from datacenterlight.models import StripePlan stripe.api_key = settings.STRIPE_API_PRIVATE_KEY