Stripe checkout #104411

Merged
Anna Sirota merged 61 commits from stripe into main 2024-06-17 18:08:41 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit cefff99876 - Show all commits

View File

@ -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

View File

@ -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: