Stripe checkout #104411
@ -107,7 +107,7 @@ class JoinView(LoginRequiredMixin, FormView):
|
|||||||
subscription = self.subscription
|
subscription = self.subscription
|
||||||
is_new = False
|
is_new = False
|
||||||
if not subscription:
|
if not subscription:
|
||||||
subscription = looper.models.Subscription()
|
subscription = looper.models.Subscription(customer=self.customer)
|
||||||
is_new = True
|
is_new = True
|
||||||
logger.debug('Creating an new subscription for %s, %s', gateway)
|
logger.debug('Creating an new subscription for %s, %s', gateway)
|
||||||
collection_method = self.plan_variation.collection_method
|
collection_method = self.plan_variation.collection_method
|
||||||
|
@ -53,7 +53,7 @@ class SingleSubscriptionMixin(LoginRequiredMixin):
|
|||||||
The AnonymousUser instance doesn't have a 'subscriptions' property,
|
The AnonymousUser instance doesn't have a 'subscriptions' property,
|
||||||
but login checking only happens in the super().dispatch() call.
|
but login checking only happens in the super().dispatch() call.
|
||||||
"""
|
"""
|
||||||
if not hasattr(request.user.customer, 'subscription_set'):
|
if not hasattr(request.user, 'customer'):
|
||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
response = self.pre_dispatch(request, *args, **kwargs)
|
response = self.pre_dispatch(request, *args, **kwargs)
|
||||||
if response:
|
if response:
|
||||||
|
Loading…
Reference in New Issue
Block a user