Skip to content

Commit

Permalink
Fix: incorrect Language initialization steps before mining
Browse files Browse the repository at this point in the history
Was not thoroughly tested, so no wounder it slipped through the cracks.
  • Loading branch information
dabico committed Mar 25, 2024
1 parent 4cbcaa4 commit a4a8508
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/main/java/ch/usi/si/seart/service/LanguageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,18 @@ public void afterPropertiesSet() {
),
() -> {
log.debug("Initializing progress for {} to default start date...", name);
languageProgressRepository.save(
Language.Progress.builder()
.id(language.getId())
.language(language)
.checkpoint(defaultCheckpoint)
.build()
);
Language.Progress progress = Language.Progress.builder()
.id(language.getId())
.language(language)
.checkpoint(defaultCheckpoint)
.build();
Language.Statistics statistics = Language.Statistics.builder()
.id(language.getId())
.language(language)
.build();
language.setProgress(progress);
language.setStatistics(statistics);
languageRepository.save(language);
});
}
}
Expand Down

0 comments on commit a4a8508

Please sign in to comment.