Stripe checkout #104411
@ -111,8 +111,10 @@ def _on_subscription_status_activated(sender: looper.models.Subscription, **kwar
|
||||
@receiver(looper.signals.subscription_expired)
|
||||
def _on_subscription_status_deactivated(sender: looper.models.Subscription, **kwargs):
|
||||
# No other active subscription exists, subscriber badge can be revoked
|
||||
if not queries.has_active_subscription(sender.user):
|
||||
users.tasks.revoke_blender_id_role(pk=sender.user_id, role='cloud_subscriber')
|
||||
customer = sender.customer
|
||||
user = customer.user
|
||||
if user and not queries.has_active_subscription(user):
|
||||
users.tasks.revoke_blender_id_role(pk=user.pk, role='cloud_subscriber')
|
||||
|
||||
if not hasattr(sender, 'team'):
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user