From 076d9899eade83bb31d14cb1e6f69dd46ffd00f8 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sun, 12 Apr 2020 19:27:14 +0200 Subject: [PATCH] rename --- app/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models.py b/app/models.py index d40c6d39..1ba7d798 100644 --- a/app/models.py +++ b/app/models.py @@ -202,7 +202,7 @@ class User(db.Model, ModelMixin, UserMixin): return user - def lifetime_or_active_subscription(self) -> bool: + def _lifetime_or_active_subscription(self) -> bool: """True if user has lifetime licence or active subscription""" if self.lifetime: return True @@ -219,7 +219,7 @@ class User(db.Model, ModelMixin, UserMixin): def in_trial(self): """return True if user does not have lifetime licence or an active subscription AND is in trial period""" - if self.lifetime_or_active_subscription(): + if self._lifetime_or_active_subscription(): return False if self.trial_end and arrow.now() < self.trial_end: @@ -228,7 +228,7 @@ class User(db.Model, ModelMixin, UserMixin): return False def should_upgrade(self): - if self.lifetime_or_active_subscription(): + if self._lifetime_or_active_subscription(): # user who has canceled can also re-subscribe sub: Subscription = self.get_subscription() if sub and sub.cancelled: @@ -264,7 +264,7 @@ class User(db.Model, ModelMixin, UserMixin): - in trial period or - active subscription """ - if self.lifetime_or_active_subscription(): + if self._lifetime_or_active_subscription(): return True if self.trial_end and arrow.now() < self.trial_end: