File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
backend/src/main/java/ch/puzzle/okr/service/business Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,8 @@ public List<AlignmentDto> getAlignmentPossibilities(Long quarterId) {
57
57
List <Objective > objectivesByQuarter = objectivePersistenceService .findObjectiveByQuarterId (quarterId );
58
58
List <AlignmentDto > alignmentDtoList = new ArrayList <>();
59
59
60
- Set <Team > teamSet = new HashSet <>();
61
- objectivesByQuarter .forEach (objective -> teamSet .add (objective .getTeam ()));
62
- List <Team > teamList = new ArrayList <>(teamSet .stream ().sorted (Comparator .comparing (Team ::getName )).toList ());
60
+ List <Team > teamList = objectivesByQuarter .stream ().map (Objective ::getTeam ).distinct ()
61
+ .sorted (Comparator .comparing (Team ::getName )).toList ();
63
62
64
63
teamList .forEach (team -> {
65
64
List <Objective > filteredObjectiveList = objectivesByQuarter .stream ()
You can’t perform that action at this time.
0 commit comments