Browse Source

do not use next_bill_date to know whether user is premium

Son NK 5 years ago
parent
commit
034605d9ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models.py

+ 1 - 1
app/models.py

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