Safty Check if deadline or start date is null #91

Merged
sebastian merged 1 commits from fix-issue-87 into master 2023-12-21 11:32:43 +01:00

View File

@ -109,7 +109,7 @@ public class TaskController {
return ResponseEntity.status(404).body(new SimpleStatusResponse("failed"));
}
if(taskFieldInfo.getStartDate().isAfter(taskFieldInfo.getDeadline())) {
if(taskFieldInfo.getStartDate() != null && taskFieldInfo.getDeadline() != null && taskFieldInfo.getStartDate().isAfter(taskFieldInfo.getDeadline())) {
return ResponseEntity.status(400).body(new SimpleStatusResponse("failed"));
}