From f0ea10bd0e02e15663b0da4435fd317e4e159a6b Mon Sep 17 00:00:00 2001 From: root <root@prc.prc.parkinson.lu> Date: Fri, 10 Mar 2017 11:04:56 +0100 Subject: [PATCH] approaching visits appear 3 months before --- smash/web/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smash/web/views.py b/smash/web/views.py index 0466b85a..d7e114ea 100644 --- a/smash/web/views.py +++ b/smash/web/views.py @@ -183,7 +183,7 @@ def get_approaching_visits_without_appointments_count(user): def get_approaching_visits_without_appointments(user): today = get_today_midnight_date() - today_plus_two_months =today+datetime.timedelta(days=62) + today_plus_two_months =today+datetime.timedelta(days=93) return Visit.objects.annotate(my_count=Count(Case(When(appointment__status=Appointment.APPOINTMENT_STATUS_SCHEDULED, then=1)))).filter( datetime_begin__gt = today, datetime_begin__lt = today_plus_two_months, -- GitLab