From 3d57edfcf865028f2ab75fa64c0cdf5a21441d67 Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Mon, 6 Mar 2023 18:57:46 +0530 Subject: [PATCH] fix: cycle date filtering for current and upcoming cycle (#357) * fix: update filtering for completed cycles * fix: filter updated for upcoming cycles --- apiserver/plane/api/views/cycle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/plane/api/views/cycle.py b/apiserver/plane/api/views/cycle.py index bade62098..9ab961de7 100644 --- a/apiserver/plane/api/views/cycle.py +++ b/apiserver/plane/api/views/cycle.py @@ -284,7 +284,7 @@ class CurrentUpcomingCyclesEndpoint(BaseAPIView): upcoming_cycle = Cycle.objects.filter( workspace__slug=slug, project_id=project_id, - start_date__gte=timezone.now(), + start_date__gt=timezone.now(), ) return Response( @@ -309,7 +309,7 @@ class CompletedCyclesEndpoint(BaseAPIView): completed_cycles = Cycle.objects.filter( workspace__slug=slug, project_id=project_id, - end_date__lte=timezone.now(), + end_date__lt=timezone.now(), ) return Response(