Fix when no rounds
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -96,6 +96,7 @@ public class TournamentMapper implements DtoMapper<Tournament, TournamentDto>, E
|
||||
for (var event : tournament.getEvents()) {
|
||||
if (event.getGroups() != null) {
|
||||
for (var group : event.getGroups()) {
|
||||
if (group.getRounds() != null) {
|
||||
for (var round : group.getRounds()) {
|
||||
for (var match : round.getMatches()) {
|
||||
if (match.getStatus() == Status.IN_PROGRESS && match.getCounter() != null) {
|
||||
@@ -109,6 +110,7 @@ public class TournamentMapper implements DtoMapper<Tournament, TournamentDto>, E
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return playersCounting;
|
||||
}
|
||||
|
||||
@@ -118,6 +120,7 @@ public class TournamentMapper implements DtoMapper<Tournament, TournamentDto>, E
|
||||
for (var event : tournament.getEvents()) {
|
||||
if (event.getGroups() != null) {
|
||||
for (var group : event.getGroups()) {
|
||||
if (group.getRounds() != null) {
|
||||
for (var round : group.getRounds()) {
|
||||
for (var match : round.getMatches()) {
|
||||
if (match.getStatus() == Status.IN_PROGRESS) {
|
||||
@@ -128,6 +131,7 @@ public class TournamentMapper implements DtoMapper<Tournament, TournamentDto>, E
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return playersPlaying;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user