do not use next_bill_date to know whether user is premium

This commit is contained in:
Son NK 2019-11-15 11:03:13 +01:00
parent 3442250bb1
commit 034605d9ac
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class User(db.Model, ModelMixin, UserMixin):
def is_premium(self):
"""user is premium if they have a active subscription"""
sub: Subscription = self.get_subscription()
return sub is not None and sub.next_bill_date > arrow.now().date()
return sub is not None and not sub.cancelled
def is_trial(self):
return self.trial_expiration is not None and self.trial_expiration > arrow.now()