From b406c30889fa07671056cea51762ad512b9a0c23 Mon Sep 17 00:00:00 2001 From: nikita Date: Sat, 29 Sep 2018 14:58:24 +0300 Subject: [PATCH] Date_end and prolongation date_start fixed --- apps/school/views.py | 2 +- apps/user/views.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/school/views.py b/apps/school/views.py index e86a309a..0bc8529f 100644 --- a/apps/school/views.py +++ b/apps/school/views.py @@ -194,7 +194,7 @@ class SchoolView(TemplateView): 'school_schedules_purchased': school_schedules_purchased, 'school_purchased_future': False, 'subscription_ends': subscription_ends, - 'prolong_date_start': subscription_ends + timedelta(days=1) if subscription_ends else None, + 'prolong_date_start': subscription_ends if subscription_ends else None, 'allow_prolong': subscription_ends - date_now <= timedelta(days=7) if subscription_ends else False, }) return context diff --git a/apps/user/views.py b/apps/user/views.py index 3b18c952..b564b5ec 100644 --- a/apps/user/views.py +++ b/apps/user/views.py @@ -70,7 +70,6 @@ class ProfileView(TemplateView): ).distinct() school_payment = SchoolPayment.objects.filter( user=self.object, - date_start__lte=now(), date_end__gte=now(), status__in=[ Pingback.PINGBACK_TYPE_REGULAR,