Show "upgrade" button if user is in trial
This commit is contained in:
parent
7cb1c219ed
commit
ed9e3f9085
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue