From fb62322794402efbe4b52798a1454c9615952a04 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 23 Feb 2020 16:31:55 +0700 Subject: [PATCH] User who has valid manual sub is premium --- app/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models.py b/app/models.py index d5b774f0..80d4e5bd 100644 --- a/app/models.py +++ b/app/models.py @@ -194,6 +194,10 @@ class User(db.Model, ModelMixin, UserMixin): if sub: return True + manual_sub: ManualSubscription = ManualSubscription.get_by(user_id=self.id) + if manual_sub and manual_sub.end_at > arrow.now(): + return True + return False def in_trial(self):