Skip to content

Commit

Permalink
fix 3.7.2 upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
meek0 committed Feb 5, 2020
1 parent d5d7d14 commit 391bc32
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public void execute(Version version) {
logger.info("Updating studies and networks with their membership sort orders.");
mongoTemplate.execute(db -> db.eval(setMemberShipSortOrder()));

studyService.findAllStates().stream().filter(state -> !state.hasRevisionsAhead()).forEach(state -> {
studyService.findAllStates().stream().filter(state -> !state.hasRevisionsAhead() && state.isPublished()).forEach(state -> {
studyService.save(studyService.findStudy(state.getId()), "Updating membership sort orders.");
studyService.publish(state.getId(), true, PublishCascadingScope.NONE);
});

networkService.findAllStates().stream().filter(state -> !state.hasRevisionsAhead()).forEach(state -> {
networkService.findAllStates().stream().filter(state -> !state.hasRevisionsAhead() && state.isPublished()).forEach(state -> {
networkService.save(networkService.findById(state.getId()), "Updating membership sort orders.");
networkService.publish(state.getId(), true, PublishCascadingScope.NONE);
});
Expand Down

0 comments on commit 391bc32

Please sign in to comment.