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""" """User is invited to upgrade if they are in free plan or their trial ends soon"""
if self.plan == PlanEnum.free: if self.plan == PlanEnum.free:
return True return True
elif self.plan == PlanEnum.trial and self.plan_expiration < arrow.now().shift( elif self.plan == PlanEnum.trial:
weeks=1
):
return True return True
return False return False