forked from github/plane
fix: cycle date filtering for current and upcoming cycle (#357)
* fix: update filtering for completed cycles * fix: filter updated for upcoming cycles
This commit is contained in:
parent
ae64b53cf3
commit
3d57edfcf8
@ -284,7 +284,7 @@ class CurrentUpcomingCyclesEndpoint(BaseAPIView):
|
|||||||
upcoming_cycle = Cycle.objects.filter(
|
upcoming_cycle = Cycle.objects.filter(
|
||||||
workspace__slug=slug,
|
workspace__slug=slug,
|
||||||
project_id=project_id,
|
project_id=project_id,
|
||||||
start_date__gte=timezone.now(),
|
start_date__gt=timezone.now(),
|
||||||
)
|
)
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
@ -309,7 +309,7 @@ class CompletedCyclesEndpoint(BaseAPIView):
|
|||||||
completed_cycles = Cycle.objects.filter(
|
completed_cycles = Cycle.objects.filter(
|
||||||
workspace__slug=slug,
|
workspace__slug=slug,
|
||||||
project_id=project_id,
|
project_id=project_id,
|
||||||
end_date__lte=timezone.now(),
|
end_date__lt=timezone.now(),
|
||||||
)
|
)
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
|
Loading…
Reference in New Issue
Block a user