Delete Tasks that do not belong to any series
This commit is contained in:
parent
e58e6addb9
commit
3e3fba9b2d
@ -90,7 +90,9 @@ public class TaskService {
|
|||||||
public void deleteTask(Task task) {
|
public void deleteTask(Task task) {
|
||||||
task.getTaskgroup().getTasks().remove(task);
|
task.getTaskgroup().getTasks().remove(task);
|
||||||
taskgroupRepository.save(task.getTaskgroup());
|
taskgroupRepository.save(task.getTaskgroup());
|
||||||
|
if(task.getTaskSerieItem() != null) {
|
||||||
taskSeriesService.deleteTaskSeriesItem(task);
|
taskSeriesService.deleteTaskSeriesItem(task);
|
||||||
|
}
|
||||||
taskRepository.delete(task);
|
taskRepository.delete(task);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user