Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/plane/api/views/cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def post(self, request, slug, project_id, cycle_id):
Only cycles that have ended can be archived.
"""
cycle = Cycle.objects.get(pk=cycle_id, project_id=project_id, workspace__slug=slug)
if cycle.end_date >= timezone.now():
if cycle.end_date is None or cycle.end_date >= timezone.now():
return Response(
{"error": "Only completed cycles can be archived"},
status=status.HTTP_400_BAD_REQUEST,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/plane/app/views/cycle/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def get(self, request, slug, project_id, pk=None):
def post(self, request, slug, project_id, cycle_id):
cycle = Cycle.objects.get(pk=cycle_id, project_id=project_id, workspace__slug=slug)

if cycle.end_date >= timezone.now():
if cycle.end_date is None or cycle.end_date >= timezone.now():
return Response(
{"error": "Only completed cycles can be archived"},
status=status.HTTP_400_BAD_REQUEST,
Expand Down
Loading