Show "upgrade" button if user is in trial

This commit is contained in:
Son NK 2019-08-19 21:38:59 +02:00
parent 7cb1c219ed
commit ed9e3f9085
1 changed files with 1 additions and 3 deletions

View File

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