Skip to content

Commit

Permalink
Updated TaskService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
alina tarasova committed Apr 27, 2024
1 parent 98960cd commit 6454675
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/hexlet/code/service/TaskService.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ public void delete(Long id) {
new ResourceNotFoundException("Task with id " + id + " not found"));

//удаляю таску из списка автора:
task.getAssignee().removeTask(task);
var assignee = task.getAssignee();
if (assignee != null) {
assignee.removeTask(task);
}

//удаляю таску из статусов:
task.getTaskStatus().removeTask(task);
Expand Down

0 comments on commit 6454675

Please sign in to comment.