fixed removeTasksForCrop
This commit is contained in:
parent
11a1a63345
commit
6dea42dd1f
|
@ -87,6 +87,13 @@ public class JsonTaskList implements TaskList {
|
|||
loadTaskListFromFile();
|
||||
}
|
||||
taskMap.values().removeIf(task -> task.getCropId() == cropId);
|
||||
for (Task task :
|
||||
taskMap.values()) {
|
||||
if (task.getCropId() == cropId) {
|
||||
taskMap.remove(task);
|
||||
}
|
||||
}
|
||||
writeTaskListToFile();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,6 @@ public class JsonTaskListTest {
|
|||
|
||||
}
|
||||
|
||||
@Disabled("disabled until adding works.")
|
||||
@Test
|
||||
@DisplayName("Add task.")
|
||||
void addTask() {
|
||||
|
|
Loading…
Reference in New Issue