From 78df95395bd0ad0c5463a2c6eefb107f63225967 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sat, 5 Jun 2021 17:20:42 +0200 Subject: [PATCH] improve upgrade_channel --- app/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index 37aeaf8a..e9e04fe6 100644 --- a/app/models.py +++ b/app/models.py @@ -462,7 +462,10 @@ class User(db.Model, ModelMixin, UserMixin, PasswordOracle): sub: Subscription = self.get_subscription() if sub: - return f"Paddle Subscription {sub.subscription_id}" + if sub.cancelled: + return f"Cancelled Paddle Subscription {sub.subscription_id}" + else: + return f"Active Paddle Subscription {sub.subscription_id}" apple_sub: AppleSubscription = AppleSubscription.get_by(user_id=self.id) if apple_sub and apple_sub.is_valid():