improved the condition for the consistency check

This commit is contained in:
Frank Mittag committed 2018-03-06 10:42:39 +01:00
1 parent 611fd71e2a
commit 6db8ab4050
1 file changed
+2 -1
@@ -797,7 +797,8 @@ public class DomainFactoryImpl implements DomainFactory {
for (Leaderboard leaderboard: leaderboardGroup.getLeaderboards()) {
if (leaderboard instanceof RegattaLeaderboard) {
RegattaLeaderboard regattaLeaderboard = (RegattaLeaderboard) leaderboard;
if (canBoatsOfCompetitorsChangePerRace != regattaLeaderboard.getRegatta().canBoatsOfCompetitorsChangePerRace()) {
boolean hasTrackedRaces = Util.size(regattaLeaderboard.getTrackedRaces()) > 0;
if (hasTrackedRaces && canBoatsOfCompetitorsChangePerRace != regattaLeaderboard.getRegatta().canBoatsOfCompetitorsChangePerRace()) {
result = false;
break;
}