From 034605d9ac083bcc6fb69e83a2336607e1117e68 Mon Sep 17 00:00:00 2001 From: Son NK Date: Fri, 15 Nov 2019 11:03:13 +0100 Subject: [PATCH] do not use next_bill_date to know whether user is premium --- app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index e9082e0f..3b42782f 100644 --- a/app/models.py +++ b/app/models.py @@ -128,7 +128,7 @@ class User(db.Model, ModelMixin, UserMixin): def is_premium(self): """user is premium if they have a active subscription""" sub: Subscription = self.get_subscription() - return sub is not None and sub.next_bill_date > arrow.now().date() + return sub is not None and not sub.cancelled def is_trial(self): return self.trial_expiration is not None and self.trial_expiration > arrow.now()