From 302a44b392fe228f6c20730bd132322a64d9ebaf Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Tue, 5 Jun 2018 18:36:51 +0200 Subject: [PATCH] cause the package object to be updated when the ratings aggregates change --- .../haikudepotserver/userrating/UserRatingServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/userrating/UserRatingServiceImpl.java b/haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/userrating/UserRatingServiceImpl.java index 1a34c556..4b3fd8c6 100644 --- a/haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/userrating/UserRatingServiceImpl.java +++ b/haikudepotserver-core/src/main/java/org/haiku/haikudepotserver/userrating/UserRatingServiceImpl.java @@ -381,6 +381,7 @@ private void updateUserRatingDerivation(String pkgName, String repositoryCode) { pkgUserRatingAggregate.setDerivedRating(rating.get().getRating()); pkgUserRatingAggregate.setDerivedRatingSampleSize(rating.get().getSampleSize()); + pkg.setModifyTimestamp(); } else { @@ -390,6 +391,7 @@ private void updateUserRatingDerivation(String pkgName, String repositoryCode) { if(pkgUserRatingAggregateOptional.isPresent()) { pkg.removeFromPkgUserRatingAggregates(pkgUserRatingAggregateOptional.get()); context.deleteObject(pkgUserRatingAggregateOptional.get()); + pkg.setModifyTimestamp(); } }