Skip to content

Commit

Permalink
cause the package object to be updated when the ratings aggregates ch…
Browse files Browse the repository at this point in the history
…ange
  • Loading branch information
andponlin committed Jun 5, 2018
1 parent 22be92d commit 302a44b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ private void updateUserRatingDerivation(String pkgName, String repositoryCode) {

pkgUserRatingAggregate.setDerivedRating(rating.get().getRating());
pkgUserRatingAggregate.setDerivedRatingSampleSize(rating.get().getSampleSize());
pkg.setModifyTimestamp();
}
else {

Expand All @@ -390,6 +391,7 @@ private void updateUserRatingDerivation(String pkgName, String repositoryCode) {
if(pkgUserRatingAggregateOptional.isPresent()) {
pkg.removeFromPkgUserRatingAggregates(pkgUserRatingAggregateOptional.get());
context.deleteObject(pkgUserRatingAggregateOptional.get());
pkg.setModifyTimestamp();
}
}

Expand Down

0 comments on commit 302a44b

Please sign in to comment.