mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 15:53:22 +08:00
Show "upgrade" button if user is in trial
This commit is contained in:
parent
7cb1c219ed
commit
ed9e3f9085
1 changed files with 1 additions and 3 deletions
|
@ -141,9 +141,7 @@ class User(db.Model, ModelMixin, UserMixin):
|
|||
"""User is invited to upgrade if they are in free plan or their trial ends soon"""
|
||||
if self.plan == PlanEnum.free:
|
||||
return True
|
||||
elif self.plan == PlanEnum.trial and self.plan_expiration < arrow.now().shift(
|
||||
weeks=1
|
||||
):
|
||||
elif self.plan == PlanEnum.trial:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue