auto recurring testing phase 22
This commit is contained in:
@@ -119,9 +119,9 @@ class SubscriptionCreateOrUpdateView(LoginRequiredMixin, generic.View):
|
||||
def handle_stripe_price(self, form):
|
||||
try:
|
||||
stripe.api_key = settings.STRIPE_SECRET_KEY
|
||||
|
||||
stripe_product_id = form.instance.stripe_product.product_id if form.instance.stripe_product else None
|
||||
# creating Stripe price only if the subscription is not free
|
||||
if not form.cleaned_data.get("is_free"):
|
||||
if not form.cleaned_data.get("is_free") and stripe_product_id:
|
||||
# Getting Stripe Product ID
|
||||
stripe_product = form.instance.stripe_product
|
||||
plan = form.instance.plan
|
||||
|
||||
Reference in New Issue
Block a user