mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 15:53:22 +08:00
do not use next_bill_date to know whether user is premium
This commit is contained in:
parent
3442250bb1
commit
034605d9ac
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue