Skip to content

Commit

Permalink
Merge branch 'dev52' into 52_newDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
jflamy committed Aug 15, 2024
2 parents 823b426 + 31ab446 commit c5c4848
Show file tree
Hide file tree
Showing 7 changed files with 380 additions and 364 deletions.
8 changes: 4 additions & 4 deletions owlcms/src/main/java/app/owlcms/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private static void injectData(InitialData data,
logger.info("database not empty: {}", allCompetitions.get(0).getCompetitionName());
List<AgeGroup> ags = AgeGroupRepository.findAll();
if (ags.isEmpty()) {
logger.info("creating age groups and categories");
logger.info("Creating age groups and categories");
JPAService.runInTransaction(em -> {
AgeGroupRepository.insertAgeGroups(em, null);
return null;
Expand All @@ -297,7 +297,7 @@ private static void injectData(InitialData data,
}
List<Config> configs = ConfigRepository.findAll();
if (configs.isEmpty()) {
logger.info("adding config object");
logger.debug("adding config object");
Config.setCurrent(new Config());
}

Expand All @@ -306,13 +306,13 @@ private static void injectData(InitialData data,
&& AthleteRepository.countFiltered(null, null, null, null, null, null, null, null) > 0) {
// database has athletes, but no participations. 4.22 and earlier.
// need to create Participation entries for the Athletes.
logger.info("updating database: computing athlete eligibility to age groups and categories.");
logger.debug("updating database: computing athlete eligibility to age groups and categories.");
AthleteRepository.resetParticipations();
}

List<Category> nullCodeCategories = CategoryRepository.findNullCodes();
if (!nullCodeCategories.isEmpty()) {
logger.info("updating category codes", nullCodeCategories);
logger.debug("updating category codes", nullCodeCategories);
CategoryRepository.fixNullCodes(nullCodeCategories);
}

Expand Down
Loading

0 comments on commit c5c4848

Please sign in to comment.