do not show upgrade button for lifetime user

This commit is contained in:
Son 2022-05-20 11:00:11 +02:00
parent 0e3be23acc
commit a7d419eec3
1 changed files with 3 additions and 0 deletions

View File

@ -640,6 +640,9 @@ class User(Base, ModelMixin, UserMixin, PasswordOracle):
return False
def should_show_upgrade_button(self):
if self.lifetime:
return False
if self.lifetime_or_active_subscription():
# user who has canceled can also re-subscribe
sub: Subscription = self.get_subscription()