Safty Check if deadline or start date is null
This commit is contained in:
parent
ac4d6a712b
commit
a60533f379
@ -109,7 +109,7 @@ public class TaskController {
|
|||||||
return ResponseEntity.status(404).body(new SimpleStatusResponse("failed"));
|
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"));
|
return ResponseEntity.status(400).body(new SimpleStatusResponse("failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user