File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
backend/kendo-tournament-persistence/src/main/java/com/softwaremagico/kt/persistence/entities Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -272,11 +272,11 @@ public Integer getScore(Team team) {
272272 }
273273
274274 public Integer getScoreTeam1 () {
275- return getDuels ().stream ().mapToInt (duel -> duel .getCompetitor1Score ().size ()).sum ();
275+ return getDuels ().stream ().mapToInt (duel -> duel .getCompetitor1Score ().stream (). filter ( Objects :: nonNull ). toList (). size ()).sum ();
276276 }
277277
278278 public Integer getScoreTeam2 () {
279- return getDuels ().stream ().mapToInt (duel -> duel .getCompetitor2Score ().size ()).sum ();
279+ return getDuels ().stream ().mapToInt (duel -> duel .getCompetitor2Score ().stream (). filter ( Objects :: nonNull ). toList (). size ()).sum ();
280280 }
281281}
282282
You can’t perform that action at this time.
0 commit comments