fix: transfer issues endpoint (#620)

This commit is contained in:
pablohashescobar 2023-03-30 18:58:23 +05:30 committed by GitHub
parent 1558f51c23
commit 1d7b65ad83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -740,7 +740,10 @@ class TransferCycleIssueEndpoint(BaseAPIView):
workspace__slug=slug, project_id=project_id, pk=new_cycle_id workspace__slug=slug, project_id=project_id, pk=new_cycle_id
) )
if new_cycle.end_date < timezone.now().date(): if (
new_cycle.end_date is not None
and new_cycle.end_date < timezone.now().date()
):
return Response( return Response(
{ {
"error": "The cycle where the issues are transferred is already completed" "error": "The cycle where the issues are transferred is already completed"