Fix AGAIN subscription display

This commit is contained in:
Pierre Brunet 2017-11-08 02:03:43 +01:00 committed by Skia
parent 3793321c37
commit 0ba69da3b6

View File

@ -231,7 +231,7 @@ class User(AbstractBaseUser):
@cached_property @cached_property
def is_subscribed(self): def is_subscribed(self):
s = self.subscriptions.filter(subscription_start__lte=timezone.now()).last() s = self.subscriptions.filter(subscription_start__lte=timezone.now()).order_by('subscription_end').last()
return s.is_valid_now() if s is not None else False return s.is_valid_now() if s is not None else False
_club_memberships = {} _club_memberships = {}