Stripe checkout #104411
@ -107,7 +107,7 @@ class JoinView(LoginRequiredMixin, FormView):
|
||||
subscription = self.subscription
|
||||
is_new = False
|
||||
if not subscription:
|
||||
subscription = looper.models.Subscription()
|
||||
subscription = looper.models.Subscription(customer=self.customer)
|
||||
is_new = True
|
||||
logger.debug('Creating an new subscription for %s, %s', gateway)
|
||||
collection_method = self.plan_variation.collection_method
|
||||
|
@ -53,7 +53,7 @@ class SingleSubscriptionMixin(LoginRequiredMixin):
|
||||
The AnonymousUser instance doesn't have a 'subscriptions' property,
|
||||
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()
|
||||
response = self.pre_dispatch(request, *args, **kwargs)
|
||||
if response:
|
||||
|
Loading…
Reference in New Issue
Block a user